https://bz.apache.org/bugzilla/show_bug.cgi?id=64775
--- Comment #2 from Sam Horrocks <s...@daemoninc.com> --- The change in this area was the change made in "Bug 55853 - mod_jk doesn't set the content length correctly for apache 2.x" which was in r1549202 - that change was released in 1.2.39 which is when our app broke. Here's the change made in r1549202 which broke it for us: --- tomcat/jk/trunk/native/apache-2.0/mod_jk.c 2013/06/26 20:11:12 1497068 +++ tomcat/jk/trunk/native/apache-2.0/mod_jk.c 2013/12/08 20:11:13 1549202 @@ -392,7 +392,7 @@ static int JK_METHOD ws_start_response(j apr_table_set(r->headers_out, header_names[h], header_values[h]); } else if (!strcasecmp(header_names[h], "Content-Length")) { - apr_table_set(r->headers_out, header_names[h], header_values[h]); + ap_set_content_length(r, apr_atoi64(header_values[h])); } else if (!strcasecmp(header_names[h], "Transfer-Encoding")) { apr_table_set(r->headers_out, header_names[h], header_values[h]); Prior to this change, when header_values[h] was empty, it was passed along as a string to apr_table_set, which produced a Content-Length header with an empty string like this: Content-Length: After this change, the emptry string was converted to a number (the apr_atoi64 call does that), and then the number is passed to ap_set_content_length, which then causes a header to be produced like this: Content-Length: 0 That's when it broke for us - the empty string was being ignored, but the patch in r1549202 turned it into a definite zero-length even though the content-length was actually not set (since header_values[h] was empty). The patch I sent will not set the content-length header at all unless header_values[h] contains a non-empty string. -- You are receiving this mail because: You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org