You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modproxy-dev@apache.org by Graham Leggett <mi...@sharp.fm> on 2003/03/10 12:58:53 UTC
Re: mod_proxy and chunked requests
Mathias Herberts wrote:
> mod_proxy as shipped with Apache 1.3.27 does not allow chunked TE and
> therefore refuses to reroute the requests to the origin server.
mod_proxy with Apache v1.3.27 is a full HTTP/1.1 proxy, so if it is not
accepting chunked encoding for any reason then it is a bug.
Can you give more details of exactly what is not working - is it a
chunked request that proxy is not handling correctly? (As opposed to a
chunked response).
Regards,
Graham
--
-----------------------------------------
minfrin@sharp.fm "There's a moon
over Bourbon Street
tonight..."
Re: mod_proxy and chunked requests
Posted by Mathias Herberts <Ma...@gicm.fr>.
Graham Leggett wrote:
> Mathias Herberts wrote:
>
>> mod_proxy as shipped with Apache 1.3.27 does not allow chunked TE and
>> therefore refuses to reroute the requests to the origin server.
>
>
> mod_proxy with Apache v1.3.27 is a full HTTP/1.1 proxy, so if it is not
> accepting chunked encoding for any reason then it is a bug.
>
> Can you give more details of exactly what is not working - is it a
> chunked request that proxy is not handling correctly? (As opposed to a
> chunked response).
Indeed it is a chunked request that the proxy is rejecting with a 411
Content-Length required error message (and adding a Content-Length does
not help since it further rejects the request with a 400 BAD REQUEST error).
I foresee two solutions, one is to change the behavior to
REQUEST_CHUNKED_PASS and force the transmission of a Transfert-Encoding:
chunked header in ap_proxy_http_handler so that the origin server
receives the chunked request 'as-is' (the Transfert-Encoding header from
the request will not be sent as it is considered a hop-to-hop header,
see RFC 2616 13.5.1). The other option is to handle the dechunking of
the request, dealing with dynamic memory allocations to hold the request
yet of unknown length, then send a Content-Length header and the
dechunked request body to the origin server.
The first solution seems less error prone as no dynamic memory
allocation is to be done.
Regards,
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 Mathias.Herberts@gicm.fr
-- Key Fingerprint: 8778 D2FD 3B4A 6B33 10AB F503 63D0 ADAE 9112 03E4