httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 46971] New: mod_proxy inconsistent response on connection failure
Date Sun, 05 Apr 2009 14:35:02 GMT
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


Mime
View raw message