summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Kew <niq@apache.org>2009-08-23 04:00:43 +0200
committerNick Kew <niq@apache.org>2009-08-23 04:00:43 +0200
commit93cdac913c3697d21e10f6d58e0c245c19b71835 (patch)
tree6cb76d4e15fb2a821acd842f6d88238fde77bf85
parentSwitch mod_dbd to using APR_STATUS_IS_foo macros in error handling (diff)
downloadapache2-93cdac913c3697d21e10f6d58e0c245c19b71835.tar.xz
apache2-93cdac913c3697d21e10f6d58e0c245c19b71835.zip
Return consistent error status for proxy unable to connect
PR 46971 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@806920 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--CHANGES4
-rw-r--r--modules/proxy/mod_proxy_connect.c2
-rw-r--r--modules/proxy/mod_proxy_http.c5
3 files changed, 6 insertions, 5 deletions
diff --git a/CHANGES b/CHANGES
index 6c96a6be4d..bb20d9da7e 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,10 @@
Changes with Apache 2.3.3
+ *) Proxy: unable to connect to a backend is SERVICE_UNAVAILABLE,
+ rather than BAD_GATEWAY or (especially) NOT_FOUND.
+ PR 46971 [evanc nortel.com]
+
*) Various modules: Do better checking of pollset operations in order to
avoid segmentation faults if they fail. PR 46467
[Stefan Fritsch <sf sfritsch.de>]
diff --git a/modules/proxy/mod_proxy_connect.c b/modules/proxy/mod_proxy_connect.c
index 8f55e911f3..c7225c51b6 100644
--- a/modules/proxy/mod_proxy_connect.c
+++ b/modules/proxy/mod_proxy_connect.c
@@ -199,7 +199,7 @@ static int proxy_connect_handler(request_rec *r, proxy_worker *worker,
return DECLINED;
}
else {
- return HTTP_BAD_GATEWAY;
+ return HTTP_SERVICE_UNAVAILABLE;
}
}
diff --git a/modules/proxy/mod_proxy_http.c b/modules/proxy/mod_proxy_http.c
index bdfe594d69..f5be7c5f56 100644
--- a/modules/proxy/mod_proxy_http.c
+++ b/modules/proxy/mod_proxy_http.c
@@ -1972,10 +1972,7 @@ static int proxy_http_handler(request_rec *r, proxy_worker *worker,
/* 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;
+ status = HTTP_SERVICE_UNAVAILABLE;
goto cleanup;
}