diff --git a/VERSION.txt b/VERSION.txt
index 09d47000044..e0abfa17b93 100644
--- a/VERSION.txt
+++ b/VERSION.txt
@@ -1,4 +1,16 @@
-jetty-7.5.1-SNAPSHOT
+jetty-7.5.2-SNAPSHOT
+
+jetty-7.5.1.v20110908 - 08 September 2011
+ + 350634 Added Resource.newResource(File)
+ + 356190 fix monodb tests for changed test api
+ + 356428 removed timed waits from test
+ + 356693 reduce visibility to webapp of websocket implementations
+ + 356695 jetty server jars are provided for websockets
+ + 356726 Instead of the sessionDestroyed called sessionCreated after
+ invalidate session
+ + 356751 Add null protection to ServletContextHandler.doStop
+ + 356823 correctly decode close codes. Send not utf-8 close code.
+ + 357058 Acceptor thread blocking
jetty-7.5.0.v20110901 - 01 September 2011
+ 356421 Upgraded websocket to draft 13 support
diff --git a/example-jetty-embedded/pom.xml b/example-jetty-embedded/pom.xml
index 1ccafded294..43a88915769 100644
--- a/example-jetty-embedded/pom.xml
+++ b/example-jetty-embedded/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
example-jetty-embedded
diff --git a/jetty-aggregate/jetty-all-server/pom.xml b/jetty-aggregate/jetty-all-server/pom.xml
index 0f685d76257..7e6c16a86e8 100644
--- a/jetty-aggregate/jetty-all-server/pom.xml
+++ b/jetty-aggregate/jetty-all-server/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty.aggregate
jetty-aggregate-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
org.eclipse.jetty.aggregate
diff --git a/jetty-aggregate/jetty-all/pom.xml b/jetty-aggregate/jetty-all/pom.xml
index ffbb59f3130..be1cfab7da2 100644
--- a/jetty-aggregate/jetty-all/pom.xml
+++ b/jetty-aggregate/jetty-all/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty.aggregate
jetty-aggregate-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
org.eclipse.jetty.aggregate
diff --git a/jetty-aggregate/jetty-client/pom.xml b/jetty-aggregate/jetty-client/pom.xml
index 695c9dc30e1..aa987775861 100644
--- a/jetty-aggregate/jetty-client/pom.xml
+++ b/jetty-aggregate/jetty-client/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty.aggregate
jetty-aggregate-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
org.eclipse.jetty.aggregate
diff --git a/jetty-aggregate/jetty-plus/pom.xml b/jetty-aggregate/jetty-plus/pom.xml
index b03a21d166e..b42b44a4725 100644
--- a/jetty-aggregate/jetty-plus/pom.xml
+++ b/jetty-aggregate/jetty-plus/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty.aggregate
jetty-aggregate-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
org.eclipse.jetty.aggregate
diff --git a/jetty-aggregate/jetty-server/pom.xml b/jetty-aggregate/jetty-server/pom.xml
index 92dd6814e13..bf5c6d4fb02 100644
--- a/jetty-aggregate/jetty-server/pom.xml
+++ b/jetty-aggregate/jetty-server/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty.aggregate
jetty-aggregate-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
org.eclipse.jetty.aggregate
diff --git a/jetty-aggregate/jetty-servlet/pom.xml b/jetty-aggregate/jetty-servlet/pom.xml
index e7ccc3091b0..066c8733d8b 100644
--- a/jetty-aggregate/jetty-servlet/pom.xml
+++ b/jetty-aggregate/jetty-servlet/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty.aggregate
jetty-aggregate-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
org.eclipse.jetty.aggregate
diff --git a/jetty-aggregate/jetty-webapp/pom.xml b/jetty-aggregate/jetty-webapp/pom.xml
index 935c9c30c8c..9413b7d44df 100644
--- a/jetty-aggregate/jetty-webapp/pom.xml
+++ b/jetty-aggregate/jetty-webapp/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty.aggregate
jetty-aggregate-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
org.eclipse.jetty.aggregate
diff --git a/jetty-aggregate/pom.xml b/jetty-aggregate/pom.xml
index b9e4d48f5d2..57046ec5725 100644
--- a/jetty-aggregate/pom.xml
+++ b/jetty-aggregate/pom.xml
@@ -4,7 +4,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
org.eclipse.jetty.aggregate
jetty-aggregate-project
diff --git a/jetty-ajp/pom.xml b/jetty-ajp/pom.xml
index 7580b263ecd..ae866a9d0b7 100644
--- a/jetty-ajp/pom.xml
+++ b/jetty-ajp/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
jetty-ajp
diff --git a/jetty-annotations/pom.xml b/jetty-annotations/pom.xml
index a9beb33f195..92d1a530c29 100644
--- a/jetty-annotations/pom.xml
+++ b/jetty-annotations/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
jetty-annotations
diff --git a/jetty-client/pom.xml b/jetty-client/pom.xml
index a9ac913e862..a4b2982c9d3 100644
--- a/jetty-client/pom.xml
+++ b/jetty-client/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
diff --git a/jetty-continuation/pom.xml b/jetty-continuation/pom.xml
index bfa68e99b19..f3d5f2a3256 100644
--- a/jetty-continuation/pom.xml
+++ b/jetty-continuation/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
jetty-continuation
diff --git a/jetty-deploy/pom.xml b/jetty-deploy/pom.xml
index 246b83b36b5..5d2e2b8a2ae 100644
--- a/jetty-deploy/pom.xml
+++ b/jetty-deploy/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
jetty-deploy
diff --git a/jetty-distribution/pom.xml b/jetty-distribution/pom.xml
index 435aabc0487..6f8abcd6cb5 100644
--- a/jetty-distribution/pom.xml
+++ b/jetty-distribution/pom.xml
@@ -3,7 +3,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
jetty-distribution
Jetty :: Distribution Assemblies
diff --git a/jetty-http/pom.xml b/jetty-http/pom.xml
index e8f316130e7..e73ef910bff 100644
--- a/jetty-http/pom.xml
+++ b/jetty-http/pom.xml
@@ -2,7 +2,7 @@
jetty-project
org.eclipse.jetty
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
org.eclipse.jetty
diff --git a/jetty-io/pom.xml b/jetty-io/pom.xml
index 8e5ea20cea4..f009450a3a8 100644
--- a/jetty-io/pom.xml
+++ b/jetty-io/pom.xml
@@ -2,7 +2,7 @@
jetty-project
org.eclipse.jetty
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
org.eclipse.jetty
diff --git a/jetty-jaspi/pom.xml b/jetty-jaspi/pom.xml
index 4897b815aed..f08550b68d3 100644
--- a/jetty-jaspi/pom.xml
+++ b/jetty-jaspi/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
jetty-jaspi
diff --git a/jetty-jmx/pom.xml b/jetty-jmx/pom.xml
index 54e471e1801..304a7120fa1 100644
--- a/jetty-jmx/pom.xml
+++ b/jetty-jmx/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
jetty-jmx
diff --git a/jetty-jndi/pom.xml b/jetty-jndi/pom.xml
index 649a3d287d4..31420e2e5ce 100644
--- a/jetty-jndi/pom.xml
+++ b/jetty-jndi/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
jetty-jndi
diff --git a/jetty-jsp-2.1/pom.xml b/jetty-jsp-2.1/pom.xml
index 7be6ce4d4fb..ca42f774f54 100644
--- a/jetty-jsp-2.1/pom.xml
+++ b/jetty-jsp-2.1/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
jetty-jsp-2.1
diff --git a/jetty-monitor/pom.xml b/jetty-monitor/pom.xml
index c0b6794a126..584213da673 100644
--- a/jetty-monitor/pom.xml
+++ b/jetty-monitor/pom.xml
@@ -19,7 +19,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
jetty-monitor
diff --git a/jetty-nested/pom.xml b/jetty-nested/pom.xml
index 523e1bc3a0d..6c0a5f0b2c9 100644
--- a/jetty-nested/pom.xml
+++ b/jetty-nested/pom.xml
@@ -4,7 +4,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
jetty-nested
Jetty :: Nested
diff --git a/jetty-nested/src/main/java/org/eclipse/jetty/nested/NestedConnection.java b/jetty-nested/src/main/java/org/eclipse/jetty/nested/NestedConnection.java
index 045afc17e35..b377fc6f0bc 100644
--- a/jetty-nested/src/main/java/org/eclipse/jetty/nested/NestedConnection.java
+++ b/jetty-nested/src/main/java/org/eclipse/jetty/nested/NestedConnection.java
@@ -88,7 +88,8 @@ public class NestedConnection extends HttpConnection
{
getServer().handle(this);
completeResponse();
- _generator.flushBuffer();
+ while (!_generator.isComplete() && _endp.isOpen())
+ _generator.flushBuffer();
_endp.flush();
}
finally
diff --git a/jetty-nested/src/main/java/org/eclipse/jetty/nested/NestedGenerator.java b/jetty-nested/src/main/java/org/eclipse/jetty/nested/NestedGenerator.java
index 3ab098ccf1c..b9c970207e8 100644
--- a/jetty-nested/src/main/java/org/eclipse/jetty/nested/NestedGenerator.java
+++ b/jetty-nested/src/main/java/org/eclipse/jetty/nested/NestedGenerator.java
@@ -43,7 +43,7 @@ public class NestedGenerator extends AbstractGenerator
public void addContent(Buffer content, boolean last) throws IOException
{
- // LOG.debug("addContent {} {}",content.length(),last);
+ LOG.debug("addContent {} {}",content.length(),last);
if (_noContent)
{
content.clear();
@@ -70,7 +70,6 @@ public class NestedGenerator extends AbstractGenerator
// Handle any unfinished business?
if (_content != null && _content.length() > 0)
{
-
flushBuffer();
if (_content != null && _content.length() > 0)
throw new IllegalStateException("FULL");
@@ -86,20 +85,22 @@ public class NestedGenerator extends AbstractGenerator
content.clear();
_content = null;
}
- else
+ else if (!last || _buffer!=null)
{
// Yes - so we better check we have a buffer
- initContent();
+ initBuffer();
// Copy _content to buffer;
int len = 0;
len = _buffer.put(_content);
- // make sure there is space for a trailing null
+ // make sure there is space for a trailing null (???)
if (len > 0 && _buffer.space() == 0)
{
len--;
_buffer.setPutIndex(_buffer.putIndex() - 1);
}
+
+ LOG.debug("copied {} to buffer",len);
_content.skip(len);
@@ -139,7 +140,7 @@ public class NestedGenerator extends AbstractGenerator
return false;
// we better check we have a buffer
- initContent();
+ initBuffer();
// Copy _content to buffer;
@@ -149,7 +150,7 @@ public class NestedGenerator extends AbstractGenerator
}
/* ------------------------------------------------------------ */
- private void initContent() throws IOException
+ private void initBuffer() throws IOException
{
if (_buffer == null)
{
@@ -176,7 +177,7 @@ public class NestedGenerator extends AbstractGenerator
@Override
public int prepareUncheckedAddContent() throws IOException
{
- initContent();
+ initBuffer();
return _buffer.space();
}
@@ -229,6 +230,26 @@ public class NestedGenerator extends AbstractGenerator
_state = STATE_CONTENT;
}
+ /* ------------------------------------------------------------ */
+ /**
+ * Complete the message.
+ *
+ * @throws IOException
+ */
+ @Override
+ public void complete() throws IOException
+ {
+ if (_state == STATE_END)
+ return;
+
+ super.complete();
+
+ if (_state < STATE_FLUSHING)
+ _state = STATE_FLUSHING;
+
+ flushBuffer();
+ }
+
/* ------------------------------------------------------------ */
@Override
public long flushBuffer() throws IOException
@@ -236,23 +257,44 @@ public class NestedGenerator extends AbstractGenerator
if (_state == STATE_HEADER)
throw new IllegalStateException("State==HEADER");
-
- if (_content != null && _content.length() < _buffer.space() && _state != STATE_FLUSHING)
- {
- initContent();
- _buffer.put(_content);
- _content.clear();
- _content = null;
- }
+ int len = 0;
if (_buffer==null)
- return 0;
+ {
+
+ if (_content!=null && _content.length()>0)
+ {
+ // flush content directly
+ len = _endp.flush(_content);
+ if (len>0)
+ _content.skip(len);
+ }
+ }
+ else
+ {
+ if (_buffer.length()==0 && _content!=null && _content.length()>0)
+ {
+ // Copy content to buffer
+ _content.skip(_buffer.put(_content));
+ }
+
+ int size=_buffer.length();
+ len =_endp.flush(_buffer);
+ LOG.debug("flushBuffer {} of {}",len,size);
+ if (len>0)
+ _buffer.skip(len);
+ }
- int size=_buffer.length();
- int len = _buffer==null?0:_endp.flush(_buffer);
- LOG.debug("flushBuffer {} of {}",len,size);
- if (len>0)
- _buffer.skip(len);
+ if (_content!=null && _content.length()==0)
+ _content=null;
+ if (_buffer!=null && _buffer.length()==0 && _content==null)
+ {
+ _buffers.returnBuffer(_buffer);
+ _buffer=null;
+ }
+
+ if (_state==STATE_FLUSHING && _buffer==null && _content==null)
+ _state=STATE_END;
return len;
}
diff --git a/jetty-nosql/pom.xml b/jetty-nosql/pom.xml
index c62a1e3c793..80e4650a125 100644
--- a/jetty-nosql/pom.xml
+++ b/jetty-nosql/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
jetty-nosql
diff --git a/jetty-osgi/jetty-osgi-boot-jsp/pom.xml b/jetty-osgi/jetty-osgi-boot-jsp/pom.xml
index 677f5ce8a0a..f2dbf3ccdb9 100644
--- a/jetty-osgi/jetty-osgi-boot-jsp/pom.xml
+++ b/jetty-osgi/jetty-osgi-boot-jsp/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty.osgi
jetty-osgi-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
../pom.xml
4.0.0
diff --git a/jetty-osgi/jetty-osgi-boot-logback/pom.xml b/jetty-osgi/jetty-osgi-boot-logback/pom.xml
index 5999213db8a..35c52da69af 100644
--- a/jetty-osgi/jetty-osgi-boot-logback/pom.xml
+++ b/jetty-osgi/jetty-osgi-boot-logback/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty.osgi
jetty-osgi-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
../pom.xml
4.0.0
diff --git a/jetty-osgi/jetty-osgi-boot-warurl/pom.xml b/jetty-osgi/jetty-osgi-boot-warurl/pom.xml
index 23a0b8550ad..e8bee79d3f5 100644
--- a/jetty-osgi/jetty-osgi-boot-warurl/pom.xml
+++ b/jetty-osgi/jetty-osgi-boot-warurl/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty.osgi
jetty-osgi-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
../pom.xml
4.0.0
diff --git a/jetty-osgi/jetty-osgi-boot/pom.xml b/jetty-osgi/jetty-osgi-boot/pom.xml
index 7e9de39efe2..bf836058343 100644
--- a/jetty-osgi/jetty-osgi-boot/pom.xml
+++ b/jetty-osgi/jetty-osgi-boot/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty.osgi
jetty-osgi-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
../pom.xml
4.0.0
diff --git a/jetty-osgi/jetty-osgi-equinoxtools/pom.xml b/jetty-osgi/jetty-osgi-equinoxtools/pom.xml
index b474b7ff62c..075e0e811f1 100644
--- a/jetty-osgi/jetty-osgi-equinoxtools/pom.xml
+++ b/jetty-osgi/jetty-osgi-equinoxtools/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty.osgi
jetty-osgi-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
../pom.xml
4.0.0
diff --git a/jetty-osgi/jetty-osgi-httpservice/pom.xml b/jetty-osgi/jetty-osgi-httpservice/pom.xml
index e8212fe1f67..77b5a62df4d 100644
--- a/jetty-osgi/jetty-osgi-httpservice/pom.xml
+++ b/jetty-osgi/jetty-osgi-httpservice/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty.osgi
jetty-osgi-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
../pom.xml
4.0.0
diff --git a/jetty-osgi/pom.xml b/jetty-osgi/pom.xml
index ae696607c06..d257ef8bd4e 100644
--- a/jetty-osgi/pom.xml
+++ b/jetty-osgi/pom.xml
@@ -3,7 +3,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
../pom.xml
org.eclipse.jetty.osgi
diff --git a/jetty-osgi/test-jetty-osgi/pom.xml b/jetty-osgi/test-jetty-osgi/pom.xml
index 8df9f3823b0..7d64e1fac9b 100644
--- a/jetty-osgi/test-jetty-osgi/pom.xml
+++ b/jetty-osgi/test-jetty-osgi/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty.osgi
jetty-osgi-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
../pom.xml
4.0.0
diff --git a/jetty-overlay-deployer/pom.xml b/jetty-overlay-deployer/pom.xml
index d0347e44f19..0be54212822 100644
--- a/jetty-overlay-deployer/pom.xml
+++ b/jetty-overlay-deployer/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
jetty-overlay-deployer
diff --git a/jetty-plus/pom.xml b/jetty-plus/pom.xml
index 38729dcce37..2e8be6ca72d 100644
--- a/jetty-plus/pom.xml
+++ b/jetty-plus/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
jetty-plus
diff --git a/jetty-policy/pom.xml b/jetty-policy/pom.xml
index 18fd8b3d2f3..52ed445f169 100644
--- a/jetty-policy/pom.xml
+++ b/jetty-policy/pom.xml
@@ -3,7 +3,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
org.eclipse.jetty
jetty-policy
diff --git a/jetty-rewrite/pom.xml b/jetty-rewrite/pom.xml
index dd0b4bbc429..a08b6edc75d 100644
--- a/jetty-rewrite/pom.xml
+++ b/jetty-rewrite/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
jetty-rewrite
diff --git a/jetty-security/pom.xml b/jetty-security/pom.xml
index f87a115664e..2cdd1fad3a1 100644
--- a/jetty-security/pom.xml
+++ b/jetty-security/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
jetty-security
diff --git a/jetty-server/pom.xml b/jetty-server/pom.xml
index 44d0479a0a1..13f653d8f21 100644
--- a/jetty-server/pom.xml
+++ b/jetty-server/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
jetty-server
diff --git a/jetty-servlet/pom.xml b/jetty-servlet/pom.xml
index e2e4c342532..c6bcd38f54b 100644
--- a/jetty-servlet/pom.xml
+++ b/jetty-servlet/pom.xml
@@ -3,7 +3,7 @@
jetty-project
org.eclipse.jetty
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
jetty-servlet
diff --git a/jetty-servlets/pom.xml b/jetty-servlets/pom.xml
index f70b03052b9..c6bb0a28b87 100644
--- a/jetty-servlets/pom.xml
+++ b/jetty-servlets/pom.xml
@@ -3,7 +3,7 @@
jetty-project
org.eclipse.jetty
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
jetty-servlets
diff --git a/jetty-start/pom.xml b/jetty-start/pom.xml
index 2a72142d1e4..5137dc15650 100644
--- a/jetty-start/pom.xml
+++ b/jetty-start/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
jetty-start
diff --git a/jetty-util/pom.xml b/jetty-util/pom.xml
index 130cc720dbe..bfb2d4c2295 100644
--- a/jetty-util/pom.xml
+++ b/jetty-util/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
jetty-util
diff --git a/jetty-webapp/pom.xml b/jetty-webapp/pom.xml
index bf5936f5d98..38b7636cce7 100644
--- a/jetty-webapp/pom.xml
+++ b/jetty-webapp/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
jetty-webapp
diff --git a/jetty-websocket/pom.xml b/jetty-websocket/pom.xml
index 28856e3a1bd..7f3e2cedc84 100644
--- a/jetty-websocket/pom.xml
+++ b/jetty-websocket/pom.xml
@@ -3,7 +3,7 @@
jetty-project
org.eclipse.jetty
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
diff --git a/jetty-websocket/src/main/java/org/eclipse/jetty/websocket/WebSocketConnectionD13.java b/jetty-websocket/src/main/java/org/eclipse/jetty/websocket/WebSocketConnectionD13.java
index 03f4ca9d61c..bcda94485a8 100644
--- a/jetty-websocket/src/main/java/org/eclipse/jetty/websocket/WebSocketConnectionD13.java
+++ b/jetty-websocket/src/main/java/org/eclipse/jetty/websocket/WebSocketConnectionD13.java
@@ -42,7 +42,8 @@ import org.eclipse.jetty.websocket.WebSocket.OnTextMessage;
public class WebSocketConnectionD13 extends AbstractConnection implements WebSocketConnection
{
private static final Logger LOG = Log.getLogger(WebSocketConnectionD13.class);
- private static final boolean STRICT=true;
+ private static final boolean STRICT=Boolean.getBoolean("org.eclipse.jetty.websocket.STRICT");
+ private static final boolean BRUTAL=Boolean.getBoolean("org.eclipse.jetty.websocket.BRUTAL");
final static byte OP_CONTINUATION = 0x00;
final static byte OP_TEXT = 0x01;
@@ -62,7 +63,7 @@ public class WebSocketConnectionD13 extends AbstractConnection implements WebSoc
final static int CLOSE_UNDEFINED=1004;
final static int CLOSE_NO_CODE=1005;
final static int CLOSE_NO_CLOSE=1006;
- final static int CLOSE_NOT_UTF8=1007;
+ final static int CLOSE_BAD_PAYLOAD=1007;
final static int CLOSE_POLICY_VIOLATION=1008;
final static int CLOSE_MESSAGE_TOO_LARGE=1009;
final static int CLOSE_REQUIRED_EXTENSION=1010;
@@ -641,19 +642,13 @@ public class WebSocketConnectionD13 extends AbstractConnection implements WebSoc
{
if (isControlFrame(opcode) && buffer.length()>125)
{
- _connection.close(WebSocketConnectionD13.CLOSE_PROTOCOL,"Control frame too large");
+ errorClose(WebSocketConnectionD13.CLOSE_PROTOCOL,"Control frame too large");
return;
}
if ((flags&0x7)!=0)
{
- _connection.close(WebSocketConnectionD13.CLOSE_PROTOCOL,"RSV bits set 0x"+Integer.toHexString(flags));
- return;
- }
-
- if (_opcode!=-1 && opcode!=WebSocketConnectionD13.OP_CONTINUATION)
- {
- _connection.close(WebSocketConnectionD13.CLOSE_PROTOCOL,"Bad continuation"+Integer.toHexString(opcode));
+ errorClose(WebSocketConnectionD13.CLOSE_PROTOCOL,"RSV bits set 0x"+Integer.toHexString(flags));
return;
}
@@ -681,7 +676,7 @@ public class WebSocketConnectionD13 extends AbstractConnection implements WebSoc
{
if (_opcode==-1)
{
- _connection.close(WebSocketConnectionD13.CLOSE_PROTOCOL,"Bad Continuation");
+ errorClose(WebSocketConnectionD13.CLOSE_PROTOCOL,"Bad Continuation");
return;
}
@@ -756,6 +751,12 @@ public class WebSocketConnectionD13 extends AbstractConnection implements WebSoc
case WebSocketConnectionD13.OP_TEXT:
{
+ if (STRICT && _opcode!=-1)
+ {
+ errorClose(WebSocketConnectionD13.CLOSE_PROTOCOL,"Expected Continuation"+Integer.toHexString(opcode));
+ return;
+ }
+
if(_onTextMessage!=null)
{
if (_connection.getMaxTextMessageSize()<=0)
@@ -766,7 +767,7 @@ public class WebSocketConnectionD13 extends AbstractConnection implements WebSoc
else
{
LOG.warn("Frame discarded. Text aggregation disabled for {}",_endp);
- _connection.close(WebSocketConnectionD13.CLOSE_POLICY_VIOLATION,"Text frame aggregation disabled");
+ errorClose(WebSocketConnectionD13.CLOSE_POLICY_VIOLATION,"Text frame aggregation disabled");
}
}
// append bytes to message buffer (if they fit)
@@ -788,9 +789,15 @@ public class WebSocketConnectionD13 extends AbstractConnection implements WebSoc
}
break;
}
-
+
case WebSocketConnectionD13.OP_BINARY:
{
+ if (STRICT && _opcode!=-1)
+ {
+ errorClose(WebSocketConnectionD13.CLOSE_PROTOCOL,"Expected Continuation"+Integer.toHexString(opcode));
+ return;
+ }
+
if (_onBinaryMessage!=null && checkBinaryMessageSize(0,buffer.length()))
{
if (lastFrame)
@@ -808,25 +815,23 @@ public class WebSocketConnectionD13 extends AbstractConnection implements WebSoc
else
{
LOG.warn("Frame discarded. Binary aggregation disabed for {}",_endp);
- _connection.close(WebSocketConnectionD13.CLOSE_POLICY_VIOLATION,"Binary frame aggregation disabled");
+ errorClose(WebSocketConnectionD13.CLOSE_POLICY_VIOLATION,"Binary frame aggregation disabled");
}
}
break;
}
-
+
default:
if (STRICT)
- _connection.close(WebSocketConnectionD13.CLOSE_PROTOCOL,"Bad opcode 0x"+Integer.toHexString(opcode));
+ errorClose(WebSocketConnectionD13.CLOSE_PROTOCOL,"Bad opcode 0x"+Integer.toHexString(opcode));
return;
-
}
}
catch(Utf8Appendable.NotUtf8Exception notUtf8)
{
- LOG.warn(notUtf8);
LOG.warn("{} for {}",notUtf8,_endp);
LOG.debug(notUtf8);
- _connection.close(WebSocketConnectionD13.CLOSE_NOT_UTF8,"Invalid UTF-8");
+ errorClose(WebSocketConnectionD13.CLOSE_BAD_PAYLOAD,"Invalid UTF-8");
}
catch(ThreadDeath th)
{
@@ -838,6 +843,23 @@ public class WebSocketConnectionD13 extends AbstractConnection implements WebSoc
}
}
+ private void errorClose(int code, String message)
+ {
+ _connection.close(code,message);
+ if (BRUTAL)
+ {
+ try
+ {
+ _endp.close();
+ }
+ catch (IOException e)
+ {
+ LOG.warn(e.toString());
+ LOG.debug(e);
+ }
+ }
+ }
+
private boolean checkBinaryMessageSize(int bufferLen, int length)
{
int max = _connection.getMaxBinaryMessageSize();
diff --git a/jetty-websocket/src/main/java/org/eclipse/jetty/websocket/WebSocketFactory.java b/jetty-websocket/src/main/java/org/eclipse/jetty/websocket/WebSocketFactory.java
index 4752ac67d28..9ac710573c1 100644
--- a/jetty-websocket/src/main/java/org/eclipse/jetty/websocket/WebSocketFactory.java
+++ b/jetty-websocket/src/main/java/org/eclipse/jetty/websocket/WebSocketFactory.java
@@ -227,11 +227,13 @@ public class WebSocketFactory
connection = new WebSocketConnectionD12(websocket, endp, _buffers, http.getTimeStamp(), _maxIdleTime, protocol,extensions,draft);
break;
case 13:
+ case 14:
extensions= initExtensions(extensions_requested,8-WebSocketConnectionD13.OP_EXT_DATA, 16-WebSocketConnectionD13.OP_EXT_CTRL,3);
connection = new WebSocketConnectionD13(websocket, endp, _buffers, http.getTimeStamp(), _maxIdleTime, protocol,extensions,draft);
break;
default:
LOG.warn("Unsupported Websocket version: "+draft);
+ response.setHeader("Sec-WebSocket-Version","0,6,12,13,14");
throw new HttpException(400, "Unsupported draft specification: " + draft);
}
@@ -251,6 +253,8 @@ public class WebSocketFactory
request.setAttribute("org.eclipse.jetty.io.Connection", connection);
}
+ /**
+ */
protected String[] parseProtocols(String protocol)
{
if (protocol == null)
@@ -264,6 +268,8 @@ public class WebSocketFactory
return protocols;
}
+ /**
+ */
public boolean acceptWebSocket(HttpServletRequest request, HttpServletResponse response)
throws IOException
{
@@ -280,24 +286,34 @@ public class WebSocketFactory
// Try each requested protocol
WebSocket websocket = null;
- String protocol = request.getHeader("Sec-WebSocket-Protocol");
- if (protocol == null) // TODO remove once draft period is over
- protocol = request.getHeader("WebSocket-Protocol");
- for (String p : parseProtocols(protocol))
+
+ Enumeration protocols = request.getHeaders("Sec-WebSocket-Protocol");
+ String protocol=null;
+ while (protocol==null && protocols!=null && protocols.hasMoreElements())
{
- websocket = _acceptor.doWebSocketConnect(request, p);
- if (websocket != null)
+ String candidate = protocols.nextElement();
+ for (String p : parseProtocols(candidate))
{
- protocol = p;
- break;
+ websocket = _acceptor.doWebSocketConnect(request, p);
+ if (websocket != null)
+ {
+ protocol = p;
+ break;
+ }
}
}
// Did we get a websocket?
if (websocket == null)
{
- response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
- return false;
+ // Try with no protocol
+ websocket = _acceptor.doWebSocketConnect(request, null);
+
+ if (websocket==null)
+ {
+ response.sendError(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
+ return false;
+ }
}
// Send the upgrade
@@ -308,6 +324,8 @@ public class WebSocketFactory
return false;
}
+ /**
+ */
public List initExtensions(List requested,int maxDataOpcodes,int maxControlOpcodes,int maxReservedBits)
{
List extensions = new ArrayList();
@@ -339,6 +357,8 @@ public class WebSocketFactory
return extensions;
}
+ /**
+ */
private Extension newExtension(String name)
{
try
@@ -354,6 +374,4 @@ public class WebSocketFactory
return null;
}
-
-
}
diff --git a/jetty-websocket/src/test/java/org/eclipse/jetty/websocket/WebSocketMessageD00Test.java b/jetty-websocket/src/test/java/org/eclipse/jetty/websocket/WebSocketMessageD00Test.java
index 99781856907..53b31f1bf30 100644
--- a/jetty-websocket/src/test/java/org/eclipse/jetty/websocket/WebSocketMessageD00Test.java
+++ b/jetty-websocket/src/test/java/org/eclipse/jetty/websocket/WebSocketMessageD00Test.java
@@ -84,6 +84,7 @@ public class WebSocketMessageD00Test
InputStream input = socket.getInputStream();
BufferedReader reader = new BufferedReader(new InputStreamReader(input, "ISO-8859-1"));
String responseLine = reader.readLine();
+ System.err.println(responseLine);
assertTrue(responseLine.startsWith("HTTP/1.1 101 WebSocket Protocol Handshake"));
// Read until we find an empty line, which signals the end of the http response
String line;
diff --git a/jetty-websocket/src/test/java/org/eclipse/jetty/websocket/WebSocketMessageD13Test.java b/jetty-websocket/src/test/java/org/eclipse/jetty/websocket/WebSocketMessageD13Test.java
index 6c4e8ae253a..e48885c2f01 100644
--- a/jetty-websocket/src/test/java/org/eclipse/jetty/websocket/WebSocketMessageD13Test.java
+++ b/jetty-websocket/src/test/java/org/eclipse/jetty/websocket/WebSocketMessageD13Test.java
@@ -998,7 +998,7 @@ public class WebSocketMessageD13Test
assertEquals(0x80|WebSocketConnectionD13.OP_CLOSE,input.read());
assertEquals(15,input.read());
int code=(0xff&input.read())*0x100+(0xff&input.read());
- assertEquals(WebSocketConnectionD13.CLOSE_NOT_UTF8,code);
+ assertEquals(WebSocketConnectionD13.CLOSE_BAD_PAYLOAD,code);
lookFor("Invalid UTF-8",input);
}
diff --git a/jetty-xml/pom.xml b/jetty-xml/pom.xml
index 43de789eba6..34102277dd1 100644
--- a/jetty-xml/pom.xml
+++ b/jetty-xml/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
jetty-xml
diff --git a/pom.xml b/pom.xml
index 8bd937d88d4..8f0256af067 100644
--- a/pom.xml
+++ b/pom.xml
@@ -7,7 +7,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
Jetty :: Project
${jetty.url}
pom
diff --git a/test-continuation-jetty6/pom.xml b/test-continuation-jetty6/pom.xml
index 78998bc33c7..15baaa4b0f1 100644
--- a/test-continuation-jetty6/pom.xml
+++ b/test-continuation-jetty6/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
test-continuation-jetty6
diff --git a/test-continuation/pom.xml b/test-continuation/pom.xml
index f5472b090a8..60e86df9a01 100644
--- a/test-continuation/pom.xml
+++ b/test-continuation/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
test-continuation
diff --git a/test-jetty-nested/pom.xml b/test-jetty-nested/pom.xml
index fd26d1ce70c..cc2b6aeeefe 100644
--- a/test-jetty-nested/pom.xml
+++ b/test-jetty-nested/pom.xml
@@ -4,7 +4,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
test-jetty-nested
Jetty :: Nested Test
diff --git a/test-jetty-nested/src/test/java/org/eclipse/jetty/nested/NestedServer.java b/test-jetty-nested/src/test/java/org/eclipse/jetty/nested/NestedServer.java
index 2e6c950060d..7af54fc90b5 100644
--- a/test-jetty-nested/src/test/java/org/eclipse/jetty/nested/NestedServer.java
+++ b/test-jetty-nested/src/test/java/org/eclipse/jetty/nested/NestedServer.java
@@ -31,7 +31,7 @@ public class NestedServer
WebAppContext webapp = new WebAppContext();
- webapp.setContextPath("/");
+ webapp.setContextPath("/jnest");
webapp.setWar("src/main/webapp");
webapp.setParentLoaderPriority(true);
server.setHandler(webapp);
diff --git a/test-jetty-servlet/pom.xml b/test-jetty-servlet/pom.xml
index b2b7d132e3d..7f7117e8fcc 100644
--- a/test-jetty-servlet/pom.xml
+++ b/test-jetty-servlet/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
test-jetty-servlet
diff --git a/test-jetty-webapp/pom.xml b/test-jetty-webapp/pom.xml
index 779a7d84943..7cacb8acec7 100644
--- a/test-jetty-webapp/pom.xml
+++ b/test-jetty-webapp/pom.xml
@@ -2,7 +2,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
org.eclipse.jetty
diff --git a/tests/pom.xml b/tests/pom.xml
index a9cdb87fa46..1216cd35407 100644
--- a/tests/pom.xml
+++ b/tests/pom.xml
@@ -21,7 +21,7 @@
org.eclipse.jetty
jetty-project
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
org.eclipse.jetty.tests
tests-parent
diff --git a/tests/test-integration/pom.xml b/tests/test-integration/pom.xml
index 08d90fb3462..c691ebdbdc3 100644
--- a/tests/test-integration/pom.xml
+++ b/tests/test-integration/pom.xml
@@ -20,7 +20,7 @@
org.eclipse.jetty.tests
tests-parent
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
4.0.0
test-integration
diff --git a/tests/test-loginservice/pom.xml b/tests/test-loginservice/pom.xml
index 83a40a8b980..857235f27e7 100644
--- a/tests/test-loginservice/pom.xml
+++ b/tests/test-loginservice/pom.xml
@@ -21,7 +21,7 @@
org.eclipse.jetty.tests
tests-parent
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
test-loginservice
Jetty Tests :: Login Service
diff --git a/tests/test-sessions/pom.xml b/tests/test-sessions/pom.xml
index bf9f8455215..d3c4048480d 100644
--- a/tests/test-sessions/pom.xml
+++ b/tests/test-sessions/pom.xml
@@ -21,7 +21,7 @@
org.eclipse.jetty.tests
tests-parent
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
test-sessions-parent
Jetty Tests :: Sessions :: Parent
diff --git a/tests/test-sessions/test-hash-sessions/pom.xml b/tests/test-sessions/test-hash-sessions/pom.xml
index 3b7664027fb..a455bc9b8d9 100644
--- a/tests/test-sessions/test-hash-sessions/pom.xml
+++ b/tests/test-sessions/test-hash-sessions/pom.xml
@@ -21,7 +21,7 @@
org.eclipse.jetty.tests
test-sessions-parent
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
test-hash-sessions
Jetty Tests :: Sessions :: Hash
diff --git a/tests/test-sessions/test-jdbc-sessions/pom.xml b/tests/test-sessions/test-jdbc-sessions/pom.xml
index 7f4c41397e6..6aee00cdced 100644
--- a/tests/test-sessions/test-jdbc-sessions/pom.xml
+++ b/tests/test-sessions/test-jdbc-sessions/pom.xml
@@ -21,7 +21,7 @@
org.eclipse.jetty.tests
test-sessions-parent
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
test-jdbc-sessions
Jetty Tests :: Sessions :: JDBC
diff --git a/tests/test-sessions/test-sessions-common/pom.xml b/tests/test-sessions/test-sessions-common/pom.xml
index 5173618c30c..a04f775a610 100644
--- a/tests/test-sessions/test-sessions-common/pom.xml
+++ b/tests/test-sessions/test-sessions-common/pom.xml
@@ -21,7 +21,7 @@
org.eclipse.jetty.tests
test-sessions-parent
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
test-sessions-common
Jetty Tests :: Sessions :: Common
diff --git a/tests/test-webapps/pom.xml b/tests/test-webapps/pom.xml
index aa6d292a3b8..095c1eaa062 100644
--- a/tests/test-webapps/pom.xml
+++ b/tests/test-webapps/pom.xml
@@ -21,7 +21,7 @@
org.eclipse.jetty.tests
tests-parent
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
test-webapps-parent
Jetty Tests :: WebApps :: Parent
diff --git a/tests/test-webapps/test-webapp-rfc2616/pom.xml b/tests/test-webapps/test-webapp-rfc2616/pom.xml
index 0980eae60c5..e4d1d99f049 100644
--- a/tests/test-webapps/test-webapp-rfc2616/pom.xml
+++ b/tests/test-webapps/test-webapp-rfc2616/pom.xml
@@ -21,7 +21,7 @@
org.eclipse.jetty.tests
test-webapps-parent
- 7.5.1-SNAPSHOT
+ 7.5.2-SNAPSHOT
test-webapp-rfc2616
Jetty Tests :: WebApp :: RFC2616