From 53c2b559473b509d47f444a6c51a524384b71e08 Mon Sep 17 00:00:00 2001 From: Ruediger Pluem Date: Fri, 18 Jun 2010 12:22:13 +0000 Subject: [PATCH] * 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 --- modules/proxy/mod_proxy_ajp.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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; + } } /* -- 2.50.1