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: [email protected]
ReportedBy: [email protected]
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: [email protected]
For additional commands, e-mail: [email protected]