]> granicus.if.org Git - apache/commitdiff
Return consistent error status for proxy unable to connect
authorNick Kew <niq@apache.org>
Sun, 23 Aug 2009 02:00:43 +0000 (02:00 +0000)
committerNick Kew <niq@apache.org>
Sun, 23 Aug 2009 02:00:43 +0000 (02:00 +0000)
PR 46971

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@806920 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
modules/proxy/mod_proxy_connect.c
modules/proxy/mod_proxy_http.c

diff --git a/CHANGES b/CHANGES
index 6c96a6be4d42dd64c20d45f1279c379a76eca820..bb20d9da7e3476777dd7c0170d4921376f345a58 100644 (file)
--- 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>]
index 8f55e911f38fb0ae9346ae3c2c835767dfbfe0ed..c7225c51b6528fe4efb29c00ce21c549ad7b9828 100644 (file)
@@ -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;
         }
     }
 
index bdfe594d69f78b1a995296ac5a2c6771ebbeeedd..f5be7c5f56411b8c2a96e755ac18966047a1fdd3 100644 (file)
@@ -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;
     }