]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r955966 from trunk:
authorRuediger Pluem <rpluem@apache.org>
Mon, 12 Jul 2010 06:57:41 +0000 (06:57 +0000)
committerRuediger Pluem <rpluem@apache.org>
Mon, 12 Jul 2010 06:57:41 +0000 (06:57 +0000)
* Ensure that we only return a non fatal error if the request is idempotent
  and if we did not sent any request body so far.

Submitted by: rpluem
Reviewed by: rpluem, trawick, niq

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

STATUS
modules/proxy/mod_proxy_ajp.c

diff --git a/STATUS b/STATUS
index e68d5a7e03596c4a5406388c18c75e9acd838f51..4133e73b9d57a93d550598a5ab15500fabee4fc9 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -114,16 +114,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
            option in the docs page, like e.g. we did for SSLInsecureRenegotiation.
     wrowe asks; you mean <Compatibility> tag?  Yes, of course.
 
-  *) mod_proxy_ajp: Ensure that we only return a non fatal error if the request
-     is idempotent and if we did not sent any request body so far.
-      Trunk version of patch:
-         http://svn.apache.org/viewvc?rev=955966&view=rev
-      Backport version for 2.2.x of patch:
-         Trunk version of patch works
-      +1: rpluem, trawick, niq
-     niq asks: did anyone check whether a similar change might be in order
-     in mod_proxy_http?  Or any of the CGI implementations?
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
 
index 974251851374656cb8d1d5d6abc3bb021b285606..78f8e40299989b3748fe07c7d0a500dbbcadd800 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;
+        }
     }
 
     /*