httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Justin Erenkrantz <jus...@erenkrantz.com>
Subject Re: svn commit: r158798 - in httpd/httpd/trunk: CHANGES server/protocol.c
Date Wed, 06 Apr 2005 18:20:51 GMT
--On Wednesday, March 23, 2005 4:36 PM +0000 gregames@apache.org wrote:

> another @@ -1008,7 +1023,15 @@
>
>      rnew->status          = HTTP_OK;
>
> -    rnew->headers_in      = r->headers_in;
> +    /* did the original request have a body?  (e.g. POST w/SSI tags)
> +     * if so, make sure the subrequest doesn't inherit body headers
> +     */
> +    if (r->read_length) {
> +        clone_headers_no_body(rnew, r);
> +    } else {
> +        /* no body (common case).  clone headers the cheap way */
> +        rnew->headers_in      = r->headers_in;
> +    }

As I just noted in STATUS for 2.0, read_length isn't a sufficient check. 
It'd only be set if the client has *already* read the body *and* they used 
the 1.3.x mechanisms for reading the request body.

The proper check is to look for Transfer-Encoding and Content-Length in the 
request headers.  This is what ap_http_filter in http_filters.c does to 
look for a request body.  -- justin

Mime
View raw message