the check in modules/proxy/ajp_header.c line 712: expected_len = msg->len - (AJP_HEADER_LEN + AJP_HEADER_SZ_LEN + 1 + 1); Is giving me "off by one errors": [Tue May 09 09:59:58 2006] [error] ajp_parse_data: Wrong chunk length. Length of chunk is 8186, expected length is 8185. [Tue May 09 09:59:58 2006] [error] (120007)APR does not understand this error code: proxy: send body failed to (null) (server) [Tue May 09 09:59:59 2006] [error] ajp_parse_data: Wrong chunk length. Length of chunk is 135, expected length is 134. [Tue May 09 09:59:59 2006] [error] (120007)APR does not understand this error code: proxy: send body failed to (null) (server) Changing the line to: expected_len = msg->len - (AJP_HEADER_LEN + AJP_HEADER_SZ_LEN + 1 ); Makes it work right.
What kind of ajp server are you using? If Tomcat please let me know the version you are using.
Server: Oracle Application Server Containers for J2EE 10g (9.0.4.0.0)
So the Oracle Application Server does not sent the correct chunk length as mod_proxy_ajp works fine with Tomcat. As stated in the comment above the code the terminating zero of the message does not belong to the chunk itself and is not contained in the chunk length (but in the message length). This works this way since Tomcat 4.0.x. Changing the line to what you have proposed would make mod_proxy_ajp stop working with Tomcat.
ok! More testing shows that running mod_proxy_ajp (with my fix) makes my oc4j servers crash :)
I'm having the same problem with OC4J-10.1.3.3 using mod_proxy_ajp in Apache-2.2.9. Anyone knows a fix for this?