You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Joe Orton <jo...@redhat.com> on 2011/09/08 14:16:24 UTC

Re: svn commit: r1166551 - /httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c

On Thu, Sep 08, 2011 at 07:45:40AM -0000, Jean-Frederic Clere wrote:
> --- httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c (original)
> +++ httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c Thu Sep  8 07:45:40 2011
> @@ -214,7 +214,7 @@ static int ap_proxy_ajp_request(apr_pool
>                       "proxy: AJP: request failed to %pI (%s)",
>                       conn->worker->cp->addr,
>                       conn->worker->s->hostname);
> -        if (status == AJP_EOVERFLOW)
> +        if (status == AJP_EOVERFLOW || status == AJP_EBAD_METHOD)
>              return HTTP_BAD_REQUEST;
>          else {
>              /*

An unrecognized method from the client does not imply a syntactically 
invalid request, so it does not look like 400 is an appropriate 
response.

501 would be normal here - if I'm reading the proxy logic correctly, 
only 500 and 503 have special semantics, so it should be fine to do 
this?

Index: modules/proxy/mod_proxy_ajp.c
===================================================================
--- modules/proxy/mod_proxy_ajp.c	(revision 1166642)
+++ modules/proxy/mod_proxy_ajp.c	(working copy)
@@ -214,8 +214,10 @@
                      "proxy: AJP: request failed to %pI (%s)",
                      conn->worker->cp->addr,
                      conn->worker->s->hostname);
-        if (status == AJP_EOVERFLOW || status == AJP_EBAD_METHOD)
+        if (status == AJP_EOVERFLOW)
             return HTTP_BAD_REQUEST;
+        else if (status == AJP_EBAD_METHOD)
+            return HTTP_NOT_IMPLEMENTED;
         else {
             /*
              * This is only non fatal when the method is idempotent. In this

Re: svn commit: r1166551 - /httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c

Posted by jean-frederic clere <jf...@gmail.com>.
On 09/08/2011 02:26 PM, "Plüm, Rüdiger, VF-Group" wrote:
>

Ooops I have committed a new fix.

Cheers

Jean-Frederic

RE: svn commit: r1166551 - /httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c

Posted by "Plüm, Rüdiger, VF-Group" <ru...@vodafone.com>.
 

> -----Original Message-----
> From: Joe Orton 
> Sent: Donnerstag, 8. September 2011 14:16
> To: dev@httpd.apache.org
> Subject: Re: svn commit: r1166551 - 
> /httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c
> 
> On Thu, Sep 08, 2011 at 07:45:40AM -0000, Jean-Frederic Clere wrote:
> > --- httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c (original)
> > +++ httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c Thu Sep 
>  8 07:45:40 2011
> > @@ -214,7 +214,7 @@ static int ap_proxy_ajp_request(apr_pool
> >                       "proxy: AJP: request failed to %pI (%s)",
> >                       conn->worker->cp->addr,
> >                       conn->worker->s->hostname);
> > -        if (status == AJP_EOVERFLOW)
> > +        if (status == AJP_EOVERFLOW || status == AJP_EBAD_METHOD)
> >              return HTTP_BAD_REQUEST;
> >          else {
> >              /*
> 
> An unrecognized method from the client does not imply a syntactically 
> invalid request, so it does not look like 400 is an appropriate 
> response.
> 
> 501 would be normal here - if I'm reading the proxy logic correctly, 
> only 500 and 503 have special semantics, so it should be fine to do 
> this?
> 
> Index: modules/proxy/mod_proxy_ajp.c
> ===================================================================
> --- modules/proxy/mod_proxy_ajp.c	(revision 1166642)
> +++ modules/proxy/mod_proxy_ajp.c	(working copy)
> @@ -214,8 +214,10 @@
>                       "proxy: AJP: request failed to %pI (%s)",
>                       conn->worker->cp->addr,
>                       conn->worker->s->hostname);
> -        if (status == AJP_EOVERFLOW || status == AJP_EBAD_METHOD)
> +        if (status == AJP_EOVERFLOW)
>              return HTTP_BAD_REQUEST;
> +        else if (status == AJP_EBAD_METHOD)
> +            return HTTP_NOT_IMPLEMENTED;
>          else {
>              /*
>               * This is only non fatal when the method is 
> idempotent. In this
> 


+1

Regards

Rüdiger