httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r1398307 - /httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c
Date Mon, 15 Oct 2012 14:38:04 GMT
Author: rpluem
Date: Mon Oct 15 14:38:04 2012
New Revision: 1398307

URL: http://svn.apache.org/viewvc?rev=1398307&view=rev
Log:
* If we face a timeout during receiving the response from the backend and if
  we pinged it successfully before don't assume the whole backend has failed.
  Assume that only the request has failed and return a gateway timeout then.


Modified:
    httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c?rev=1398307&r1=1398306&r2=1398307&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c Mon Oct 15 14:38:04 2012
@@ -657,7 +657,16 @@ static int ap_proxy_ajp_request(apr_pool
              */
             rv = HTTP_SERVICE_UNAVAILABLE;
         } else {
-            rv = HTTP_INTERNAL_SERVER_ERROR;
+            /* If we had a successful cping/cpong and then a timeout
+             * we assume it is a request that cause a back-end timeout,
+             * but doesn't affect the whole worker.
+             */
+            if (APR_STATUS_IS_TIMEUP(status) && conn->worker->s->ping_timeout_set)
{
+                rv = HTTP_GATEWAY_TIME_OUT;
+            }
+            else {
+                rv = HTTP_INTERNAL_SERVER_ERROR;
+            }
         }
     }
 



Mime
View raw message