]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r806920 from trunk:
authorJim Jagielski <jim@apache.org>
Thu, 19 Nov 2009 14:07:46 +0000 (14:07 +0000)
committerJim Jagielski <jim@apache.org>
Thu, 19 Nov 2009 14:07:46 +0000 (14:07 +0000)
Return consistent error status for proxy unable to connect
PR 46971

Submitted by: niq
Reviewed/backported by: jim

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@882153 13f79535-47bb-0310-9956-ffa450edef68

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

diff --git a/CHANGES b/CHANGES
index e34a4070295a135fa05fd792dbd97f309a76211d..763b39d7d540fa6933d6590e77234badbfe96711 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -8,6 +8,10 @@ Changes with Apache 2.2.15
      control is still vulnerable, unless using OpenSSL >= 0.9.8l.  
      [Joe Orton, Ruediger Pluem]
 
+   *) Proxy: unable to connect to a backend is SERVICE_UNAVAILABLE,
+      rather than BAD_GATEWAY or (especially) NOT_FOUND.
+      PR 46971 [evanc nortel.com]
+
   *) mod_charset_lite: Honor 'CharsetOptions NoImplicitAdd'.
      [Eric Covener]
 
diff --git a/STATUS b/STATUS
index 15e66f5d52b6863ec4f11270eead26338363126a..14f951a80b45adfeea7d51747ef8f4feb5c36a65 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -87,11 +87,6 @@ RELEASE SHOWSTOPPERS:
 PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
   [ start all new proposals below, under PATCHES PROPOSED. ]
 
-  * proxy: return consistent error message in case of failure to
-    connect to backend.
-    PR 46971
-    Patch: http://svn.apache.org/viewvc?rev=806920&view=rev
-    +1: niq, covener, jim
 
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
index 8804359c0908dca1006544093615e66a1b31571c..d66a50d8193250cd0ad2958ec105a408d58688e7 100644 (file)
@@ -201,7 +201,7 @@ static int proxy_connect_handler(request_rec *r, proxy_worker *worker,
             return DECLINED;
         }
         else {
-            return HTTP_BAD_GATEWAY;
+            return HTTP_SERVICE_UNAVAILABLE;
         }
     }
 
index 3401526304072a4df25a1a0cf2ecf5fd1fb4c1f5..b8fe37c8bc2e8f9ecd6202f8433fc51c392d79dc 100644 (file)
@@ -1974,10 +1974,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;
     }