httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Plüm, Rüdiger, VF-Group" <ruediger.pl...@vodafone.com>
Subject RE: svn commit: r986333 - /httpd/httpd/trunk/modules/proxy/mod_proxy_http.c
Date Tue, 17 Aug 2010 16:00:58 GMT
 

> -----Original Message-----
> From: Jim Jagielski
> Sent: Dienstag, 17. August 2010 17:22
> To: dev@httpd.apache.org
> Subject: Re: svn commit: r986333 - 
> /httpd/httpd/trunk/modules/proxy/mod_proxy_http.c
> 
> 
> On Aug 17, 2010, at 10:55 AM, Rainer Jung wrote:
> 
> > On 17.08.2010 16:43, jim@apache.org wrote:
> >> Author: jim
> >> Date: Tue Aug 17 14:43:45 2010
> >> New Revision: 986333
> >> 
> >> URL: http://svn.apache.org/viewvc?rev=986333&view=rev
> >> Log:
> >> Further checks for non-body requests...
> >> 
> >> Modified:
> >>     httpd/httpd/trunk/modules/proxy/mod_proxy_http.c
> >> 
> >> Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_http.c
> >> URL: 
> http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/m
> od_proxy_http.c?rev=986333&r1=986332&r2=986333&view=diff
> >> 
> ==============================================================
> ================
> >> --- httpd/httpd/trunk/modules/proxy/mod_proxy_http.c (original)
> >> +++ httpd/httpd/trunk/modules/proxy/mod_proxy_http.c Tue 
> Aug 17 14:43:45 2010
> >> @@ -704,8 +704,15 @@ int ap_proxy_http_request(apr_pool_t *p,
> >>       * Send the HTTP/1.1 request to the remote server
> >>       */
> >> 
> >> +    /*
> >> +     * To be compliant, we only use 100-Continue for 
> requests with no bodies.
> >> +     * We also make sure we won't be talking HTTP/1.0 as well.
> >> +     */
> >>      do_100_continue = (worker->ping_timeout_set
> >>                         &&  !r->header_only
> >> +&&  !r->kept_body

Why does r->kept_body matter here? If we have a request body either
Content-Length or Transfer-Encoding is set.

> >> +&&  !(apr_table_get(r->headers_in, "Content-Length"))
> >> +&&  !(apr_table_get(r->headers_in, "Transfer-Encoding"))
> > 
> > Did you mean:
> > 
> > && (!apr_table_get(r->headers_in, "Content-Length") ||
> >    !apr_table_get(r->headers_in, "Transfer-Encoding")
> > 
> 
> I think you meant:
> 
>   && (!(apr_table_get(r->headers_in, "Content-Length") || 
> apr_table_get(r->headers_in, "Transfer-Encoding")))


I think you should use

 && ((apr_table_get(r->headers_in, "Content-Length") || 
 apr_table_get(r->headers_in, "Transfer-Encoding")))

as we only want do_100_continue to be true *if* we have a request body,
which means that either Content-Length or Transfer-Encoding is set
in the request. *If* both are unset then we have no request body and
hence do_100_continue should be false.


Regards

Rüdiger



Mime
View raw message