From fd0f91e363fc32904d5f098e56c16f6bfc494738 Mon Sep 17 00:00:00 2001 From: Ruediger Pluem Date: Mon, 26 May 2008 15:04:55 +0000 Subject: [PATCH] * Introduce a flag to decide whether we sent an body to the backend or not. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@660207 13f79535-47bb-0310-9956-ffa450edef68 --- modules/proxy/mod_proxy_ajp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/proxy/mod_proxy_ajp.c b/modules/proxy/mod_proxy_ajp.c index 0fb5984be0..4988bbc53c 100644 --- a/modules/proxy/mod_proxy_ajp.c +++ b/modules/proxy/mod_proxy_ajp.c @@ -165,6 +165,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r, proxy_server_conf *psf = ap_get_module_config(r->server->module_config, &proxy_module); apr_size_t maxsize = AJP_MSG_BUFFER_SZ; + int send_body = 0; if (psf->io_buffer_size_set) maxsize = psf->io_buffer_size; @@ -274,6 +275,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r, return HTTP_INTERNAL_SERVER_ERROR; } conn->worker->s->transferred += bufsiz; + send_body = 1; } } @@ -295,7 +297,7 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r, * 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. */ - if ((bufsiz == 0) && (is_idempotent(r) == METHOD_IDEMPOTENT)) { + if (!send_body && (is_idempotent(r) == METHOD_IDEMPOTENT)) { return HTTP_SERVICE_UNAVAILABLE; } return HTTP_INTERNAL_SERVER_ERROR; -- 2.40.0