Details
-
Type:
Bug
-
Status:
Resolved
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 6.0.0beta8
-
Fix Version/s: 6.0.0beta10
-
Component/s: HTTP
-
Labels:None
-
Number of attachments :
Description
In HttpConnection.Input.read(), the single byte read from the Buffer is simply returned as an int.
Unfortunately, bytes are signed in java, but the int result of InputStream.read is expected to be >= 0 if a byte could be read and -1 if it could not be read.
This lets any servlet reading a single byte assume EOF if any byte > 0x7f is read.
The following patch fixes it.
Index: modules/jetty/src/main/java/org/mortbay/jetty/HttpConnection.java
===================================================================
— modules/jetty/src/main/java/org/mortbay/jetty/HttpConnection.java (revision 200)
+++ modules/jetty/src/main/java/org/mortbay/jetty/HttpConnection.java (working copy)
@@ -717,7 +717,7 @@
The patch