Discussion:
[PATCH] mod_proxy handling of chunked requests
Mathias Herberts
2003-03-10 14:43:54 UTC
Permalink
The included quick patch should allow mod_proxy to pass chunked requests
as-is to origin servers.

The modification in proxy_http.c checks read_chunked to decide whether
or not to strip the Transfer-Encoding header.

Feedback appreciated,

Mathias.
--
-- Informatique du Credit Mutuel ---- Reseaux et Systemes Distribues
-- 32 rue Mirabeau -- Le Relecq-Kerhuon -- 29808 Brest Cedex 9, FRANCE
-- Tel +33298004653 - Fax +33298284005 - Mail ***@gicm.fr
-- Key Fingerprint: 8778 D2FD 3B4A 6B33 10AB F503 63D0 ADAE 9112 03E4
Mathias Herberts
2003-03-11 14:13:55 UTC
Permalink
Here is my second shot of a patch solving the issue of requests sent
using 'Transfer-Encoding: chunked' and handled by mod_proxy in Apache
1.3.27. Basically it changes mod_proxy behavior from
REQUEST_CHUNKED_ERROR to REQUEST_CHUNKED_PASS, meaning requests sent
using chunked transfer encoding will be passed as is to the origin server.

This patch is minimal and does not modify the behavior of mod_proxy for
non chunked requests, it issues an additional 'Transfer-Encoding:
chunked' when the request used one.

Please provide any feedback.

Mathias.
--
-- Informatique du Credit Mutuel ---- Reseaux et Systemes Distribues
-- 32 rue Mirabeau -- Le Relecq-Kerhuon -- 29808 Brest Cedex 9, FRANCE
-- Tel +33298004653 - Fax +33298284005 - Mail ***@gicm.fr
-- Key Fingerprint: 8778 D2FD 3B4A 6B33 10AB F503 63D0 ADAE 9112 03E4
Alex Rousskov
2003-03-15 06:06:35 UTC
Permalink
Mathias,

We have not tested Apache 1.3.27, but recent 2.x versions seem
to pass all our test cases related to chunked requests in a forward
proxy environment. If you can upgrade, it may solve your problem (but
may trigger other bugs).

I am sorry that I cannot help you directly, but I am excited
to see another real-world use of chunked requests. We have been
working with many HTTP implementations that cannot handle those, and
it always helps to have more real-world demand when you argue for
HTTP/1.1 compliance. I am not an Apache developer, but if you think
that testing your patch will help its inclusion in 1.x code branch,
please contact me to arrange for a free test.

Good luck,

Alex.
--
| HTTP performance - Web Polygraph benchmark
www.measurement-factory.com | HTTP compliance+ - Co-Advisor test suite
| all of the above - PolyBox appliance
Post by Mathias Herberts
Here is my second shot of a patch solving the issue of requests sent
using 'Transfer-Encoding: chunked' and handled by mod_proxy in Apache
1.3.27. Basically it changes mod_proxy behavior from
REQUEST_CHUNKED_ERROR to REQUEST_CHUNKED_PASS, meaning requests sent
using chunked transfer encoding will be passed as is to the origin server.
This patch is minimal and does not modify the behavior of mod_proxy for
chunked' when the request used one.
Please provide any feedback.
Mathias.
--
-- Informatique du Credit Mutuel ---- Reseaux et Systemes Distribues
-- 32 rue Mirabeau -- Le Relecq-Kerhuon -- 29808 Brest Cedex 9, FRANCE
-- Key Fingerprint: 8778 D2FD 3B4A 6B33 10AB F503 63D0 ADAE 9112 03E4
Loading...