You are viewing a plain text version of this content. The canonical link for it is here.
Posted to bugs@httpd.apache.org by bu...@apache.org on 2009/04/05 16:35:02 UTC

DO NOT REPLY [Bug 46971] New: mod_proxy inconsistent response on connection failure

https://issues.apache.org/bugzilla/show_bug.cgi?id=46971

           Summary: mod_proxy inconsistent response on connection failure
           Product: Apache httpd-2
           Version: 2.2.11
          Platform: Sun
        OS/Version: Solaris
            Status: NEW
          Severity: normal
          Priority: P2
         Component: mod_proxy
        AssignedTo: bugs@httpd.apache.org
        ReportedBy: evanc@nortel.com


Using Apache 2.2.11 as a forward proxy.  mod_proxy_ftp/http/connect each return
a different error in the case where connection could not be established to the
target host:

connect: HTTP_BAD_GATEWAY
ftp: HTTP_UNAVAILABLE
http: HTTP_NOT_FOUND
ajp: HTTP_UNAVAILABLE

The proxy should return a consistent error across protocols for the same
problem.  HTTP_UNAVAILABLE seems most reasonable.  NOT_FOUND prevents
distinguishing between the end server being (temporarily) unreachable and a
(permanent) file not found.

Patches to change mod_proxy_connect/http to return HTTP_UNAVAILABLE.

*** orig/httpd-2.2.11/modules/proxy/mod_proxy_connect.c Sun Sep  2 17:42:59
2007
--- httpd-2.2.11/modules/proxy/mod_proxy_connect.c      Sun Apr  5 14:23:44
2009
***************
*** 201,207 ****
              return DECLINED;
          }
          else {
!             return HTTP_BAD_GATEWAY;
          }
      }

--- 201,207 ----
              return DECLINED;
          }
          else {
!             return HTTP_SERVICE_UNAVAILABLE;
          }
      }

*** orig/httpd-2.2.11/modules/proxy/mod_proxy_http.c    Tue Nov 11 20:04:34
2008
--- httpd-2.2.11/modules/proxy/mod_proxy_http.c Sun Apr  5 14:26:09 2009
***************
*** 1954,1963 ****

      /* Step Two: Make the Connection */
      if (ap_proxy_connect_backend(proxy_function, backend, worker, r->server))
{
!         if (r->proxyreq == PROXYREQ_PROXY)
!             status = HTTP_NOT_FOUND;
!         else
!             status = HTTP_SERVICE_UNAVAILABLE;
          goto cleanup;
      }

--- 1954,1960 ----

      /* Step Two: Make the Connection */
      if (ap_proxy_connect_backend(proxy_function, backend, worker, r->server))
{
!         status = HTTP_SERVICE_UNAVAILABLE;
          goto cleanup;
      }

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 46971] mod_proxy inconsistent response on connection failure

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46971

Takashi Sato <ta...@lans-tv.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED

--- Comment #2 from Takashi Sato <ta...@lans-tv.com> 2009-12-28 20:51:12 UTC ---
backported to 2.2
http://svn.apache.org/viewvc?view=revision&revision=882153

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 46971] mod_proxy inconsistent response on connection failure

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46971

Takashi Sato <ta...@lans-tv.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|FixedInTrunk                |

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


DO NOT REPLY [Bug 46971] mod_proxy inconsistent response on connection failure

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=46971


Nick Kew <ni...@webthing.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |FixedInTrunk


--- Comment #1 from Nick Kew <ni...@webthing.com> 2009-08-22 19:01:34 PDT ---
I agree with your diagnosis.  Fixed in trunk in r806920.  Thanks for the
report.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org