remm 00/12/05 22:46:39 Modified: catalina/src/share/org/apache/catalina/connector/http HttpRequestStream.java Log: - Fix a chunking parsing bug on input. Basically, the hexadecimal number may have some extra spaces, which would make the conversion to an int fail. I found that one while toying with my HTTP client and being unable to get the whole entity body of jakarta.apache.org/tomcat/index.html. Note that it only happened on that page, not on all the jakarta.org pages, although all were transfered using chunking. Since Catalina's HttpRequestStream is based on the code I wrote for the client, it has the same bug. It should be a rare bug, though, since it only happens when the client uses chunking for the request, and extra blanks are present on the line where the chunk size is given. Revision Changes Path 1.5 +4 -4 jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpRequestStream.java Index: HttpRequestStream.java =================================================================== RCS file: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpRequestStream.java,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- HttpRequestStream.java 2000/12/02 04:34:57 1.4 +++ HttpRequestStream.java 2000/12/06 06:46:39 1.5 @@ -1,7 +1,7 @@ /* - * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpRequestStream.java,v 1.4 2000/12/02 04:34:57 remm Exp $ - * $Revision: 1.4 $ - * $Date: 2000/12/02 04:34:57 $ + * $Header: /home/cvs/jakarta-tomcat-4.0/catalina/src/share/org/apache/catalina/connector/http/HttpRequestStream.java,v 1.5 2000/12/06 06:46:39 remm Exp $ + * $Revision: 1.5 $ + * $Date: 2000/12/06 06:46:39 $ * * ==================================================================== * @@ -207,7 +207,7 @@ chunkPos = 0; try { - chunkLength = Integer.parseInt(readLine(), 16); + chunkLength = Integer.parseInt(readLine().trim(), 16); } catch (NumberFormatException e) { // Critical error, unable to parse the chunk length chunkLength = 0;