You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Ruediger Pluem <rp...@apache.org> on 2016/09/09 13:17:55 UTC

Re: svn commit: r1759984 - /httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c


On 09/09/2016 01:17 PM, elukey@apache.org wrote:
> Author: elukey
> Date: Fri Sep  9 11:17:36 2016
> New Revision: 1759984
> 
> URL: http://svn.apache.org/viewvc?rev=1759984&view=rev
> Log:
> mod_proxy_fcgi: handle the HTTP 412 use case
> 
> This is a follow up of http://svn.apache.org/r1752347;
> ap_meet_conditions could return a 412 status that if not
> handled causes subsequent bogus reads and wrong messages
> logged (like AH01070). After a chat on dev@ the feedback
> was to couple HTTP_NOT_MODIFIED with HTTP_PRECONDITION_FAILED,
> but any other feedback is welcome.
> 
> 
> Modified:
>     httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c
> 
> Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c
> URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c?rev=1759984&r1=1759983&r2=1759984&view=diff
> ==============================================================================
> --- httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c (original)
> +++ httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c Fri Sep  9 11:17:36 2016
> @@ -660,13 +660,17 @@ recv_again:
>                                      *err = "passing headers brigade to output filters";
>                                      break;
>                                  }
> -                                else if (status == HTTP_NOT_MODIFIED) {
> -                                    /* The 304 response MUST NOT contain
> -                                     * a message-body, ignore it.
> +                                else if (status == HTTP_NOT_MODIFIED
> +                                         || HTTP_PRECONDITION_FAILED) {

I guess that should be status ==  HTTP_PRECONDITION_FAILED

instead.

Regards

R�diger

> +                                    /* Special 'status' cases handled:
> +                                     * 1) HTTP 304 response MUST NOT contain
> +                                     *    a message-body, ignore it.
> +                                     * 2) HTTP 412 response.
>                                       * The break is not added since there might
>                                       * be more bytes to read from the FCGI
>                                       * connection. Even if the message-body is
> -                                     * ignored we want to avoid subsequent
> +                                     * ignored (and the EOS bucket has already
> +                                     * been sent) we want to avoid subsequent
>                                       * bogus reads. */
>                                      ignore_body = 1;
>                                  }
> 
> 
> 

Re: svn commit: r1759984 - /httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c

Posted by Luca Toscano <to...@gmail.com>.
2016-09-09 15:17 GMT+02:00 Ruediger Pluem <rp...@apache.org>:

>
>
> On 09/09/2016 01:17 PM, elukey@apache.org wrote:
> > Author: elukey
> > Date: Fri Sep  9 11:17:36 2016
> > New Revision: 1759984
> >
> > URL: http://svn.apache.org/viewvc?rev=1759984&view=rev
> > Log:
> > mod_proxy_fcgi: handle the HTTP 412 use case
> >
> > This is a follow up of http://svn.apache.org/r1752347;
> > ap_meet_conditions could return a 412 status that if not
> > handled causes subsequent bogus reads and wrong messages
> > logged (like AH01070). After a chat on dev@ the feedback
> > was to couple HTTP_NOT_MODIFIED with HTTP_PRECONDITION_FAILED,
> > but any other feedback is welcome.
> >
> >
> > Modified:
> >     httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c
> >
> > Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c
> > URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/
> proxy/mod_proxy_fcgi.c?rev=1759984&r1=1759983&r2=1759984&view=diff
> > ============================================================
> ==================
> > --- httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c (original)
> > +++ httpd/httpd/trunk/modules/proxy/mod_proxy_fcgi.c Fri Sep  9
> 11:17:36 2016
> > @@ -660,13 +660,17 @@ recv_again:
> >                                      *err = "passing headers brigade to
> output filters";
> >                                      break;
> >                                  }
> > -                                else if (status == HTTP_NOT_MODIFIED) {
> > -                                    /* The 304 response MUST NOT contain
> > -                                     * a message-body, ignore it.
> > +                                else if (status == HTTP_NOT_MODIFIED
> > +                                         || HTTP_PRECONDITION_FAILED) {
>
> I guess that should be status ==  HTTP_PRECONDITION_FAILED
>
> instead.


Fixed in r1760018, thanks a lot for spotting the mistake! I have no idea
how I missed it, really sorry..

Regards,

Luca