DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://issues.apache.org/bugzilla/show_bug.cgi?id=29345>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=29345 Wrong Content-length returned when chunked encoding Summary: Wrong Content-length returned when chunked encoding Product: Tomcat 4 Version: 4.1.18 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Blocker Priority: Other Component: Connector:Other AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Using the org.apache.ajp.tomcat4.Ajp13Connector HttpServletRequest.getContentLength() returns 0 if no content-length header was set in the HTTP request due to chunked transfer-encoding. Actually it should return -1. Btw org.apache.coyote.tomcat4.CoyoteConnector does this right. It works if one initialises contentLength to -1 instead of 0 in org.apache.tomcat.util.http.BaseRequest. However, this might not be the right/nice place to fix this bug. In org.apache.ajp.RequestHandler there is the following code, which seems to solve the problem but doesn't get called if no content-length header is set. if (hId == SC_REQ_CONTENT_LENGTH) { // just read content-length header int contentLength = (vMB == null) ? -1 : vMB.getInt(); req.setContentLength(contentLength); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]