]> granicus.if.org Git - apache/commitdiff
* Ensure that we only return a non fatal error if the request is idempotent
authorRuediger Pluem <rpluem@apache.org>
Fri, 18 Jun 2010 12:22:13 +0000 (12:22 +0000)
committerRuediger Pluem <rpluem@apache.org>
Fri, 18 Jun 2010 12:22:13 +0000 (12:22 +0000)
  and if we did not sent any request body so far.

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

modules/proxy/mod_proxy_ajp.c

index e9dac070a1cdeb1e69b9bc745ae3e70785cf9a43..010231bfc06c1ea334cf1ebcf4d6992e0820e47a 100644 (file)
@@ -583,8 +583,17 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
          */
         if (data_sent) {
             ap_proxy_backend_broke(r, output_brigade);
-        } else
+        } else if (!send_body && (is_idempotent(r) == METHOD_IDEMPOTENT)) {
+            /*
+             * This is only non fatal when we have not sent (parts) of a possible
+             * request body so far (we do not store it and thus cannot sent it
+             * again) and the method is idempotent. In this case we can dare to
+             * retry it with a different worker if we are a balancer member.
+             */
             rv = HTTP_SERVICE_UNAVAILABLE;
+        } else {
+            rv = HTTP_INTERNAL_SERVER_ERROR;
+        }
     }
 
     /*