Both docs in trunk/docs/manual/mod/mod_proxy.xml and comments in trunk/modules/proxy/mod_proxy_http.c state to use: SetEnv proxy-sendchunked 1 to force chunked T-E to the backend, however, the code tests for "proxy-sendchunks" ("s" not "ed"). Code needs changed to match docs. Also needs backports.
Created attachment 20686 [details] patch typo
The attached patch changes the code rather than the docs. Could dev@ confirm that the code rather than the docs are wrong? If not I'll fix up the docs.
Please fix the docs. Thus we avoid regressions with configurations in the wild that found out this situation and adjusted their config to the code.
What about all those that have read the docs, have their configs set as such? Those people continue to have broken setups if you fix the docs. Changing the code will at least allow people using the proxy-sendchunked env var to start working in the next release. I think the chances of someone noticing this in the code and adjusting their configs is much less than someone following the docs and never verifying that it was working. Look how long this bug has been there as proof of this.
If you do decide to fix the docs, please fix the code comments as well.
Grepping the (trunk) sources gives: ./docs/manual/env.html.en:329: <h3><a name="proxy" id="proxy">force-proxy-request-1.0, proxy-nokeepalive, proxy- sendchunked, proxy-sendcl</a></h3> ./docs/manual/env.html.ja.euc-jp:321: <h3><a name="proxy" id="proxy">force-proxy-request-1.0, proxy-nokeepalive, proxy-sendchunked, proxy-sendcl</a></h3> ./docs/manual/env.xml:369: <section id="proxy"><title>force-proxy-request-1.0, proxy-nokeepalive, proxy-sendchunked, proxy-sendcl</title> ./docs/manual/env.xml.ja:356: <section id="proxy"><title>force-proxy-request-1.0, proxy-nokeepalive, proxy- sendchunked, proxy-sendcl</title> ./docs/manual/mod/mod_proxy.html.en:289: <code>proxy-sendchunked</code> minimizes resource usage by using ./docs/manual/mod/mod_proxy.xml:260: <code>proxy-sendchunked</code> minimizes resource usage by using ./modules/proxy/mod_proxy_http.c:910: * not setenv proxy-sendchunked or has set setenv proxy-sendcl ./modules/proxy/mod_proxy_http.c:913: * setenv proxy-sendcl, and not setenv proxy-sendchunked ./modules/proxy/mod_proxy_http.c:915: * If both proxy-sendcl and proxy-sendchunked are set, the ./modules/proxy/mod_proxy_http.c:921: * To reduce server resource use, setenv proxy-sendchunked So it's clear that there's some confusion over the variable name. In fact, there's more references to 'proxy-sendchunked' in the code comments than there are in the docs. I was about to commit a sed-style fix to the trunk docs, but I'm holding off in case send-chunked (which seems to me a better phrase) wins out over send-chunks (which at least has comical value to the English :)
My suggestion: Double-check that all docs say "chunked" instead of "chunks". For code in 2.0.x and 2.2.x "stable" branches, check for "chunked" like the docs say now, as well as "chunks" which somebody who read the code might use. For code in trunk, check only "chunked".
Created attachment 20699 [details] Check for both -s and -ed variants in 2.2 Check for both sendchunks and sendchunked in 2.2 following from Jeff Trawick's suggestion. Brian's original patch for trunk is also valid. No changes required for the 2.2 docs, or any comments in the C code.
Created attachment 20700 [details] Check for -s and -ed variants in 2.0 Again following from Jeff Trawick's suggestion, this time for 2.0. The 2.0 docs don't mention either variant in env.xml, so I guess there's no changes to make there. Please review the logic of both patches carefully, as I'm not a C coder and not particularly confident that it's right.
Sorry, been busy ;) The patches in comments #8 and #9 look fine. I have not tested, though (no time) as I applied my patch to our 2.2.x tree. Thanks Vincent! -B
Backported to 2.2.x as r572421 (http://svn.apache.org/viewvc?rev=572421&view=rev).