From: Ruediger Pluem Date: Mon, 12 Jul 2010 06:57:41 +0000 (+0000) Subject: Merge r955966 from trunk: X-Git-Tag: 2.2.16~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3eb5827133341917db9c3a94bb825517c650f13c;p=thirdparty%2Fapache%2Fhttpd.git Merge r955966 from trunk: * 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 --- diff --git a/STATUS b/STATUS index e68d5a7e035..4133e73b9d5 100644 --- 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 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 ] diff --git a/modules/proxy/mod_proxy_ajp.c b/modules/proxy/mod_proxy_ajp.c index 97425185137..78f8e402999 100644 --- a/modules/proxy/mod_proxy_ajp.c +++ b/modules/proxy/mod_proxy_ajp.c @@ -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; + } } /*