From: Ruediger Pluem Date: Fri, 18 Jun 2010 12:22:13 +0000 (+0000) Subject: * Ensure that we only return a non fatal error if the request is idempotent X-Git-Tag: 2.3.7~166 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=53c2b559473b509d47f444a6c51a524384b71e08;p=apache * 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. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@955966 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/mod_proxy_ajp.c b/modules/proxy/mod_proxy_ajp.c index e9dac070a1..010231bfc0 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; + } } /*