From: Ruediger Pluem Date: Mon, 26 May 2008 15:04:55 +0000 (+0000) Subject: * Introduce a flag to decide whether we sent an body to the backend or not. X-Git-Tag: 2.3.0~585 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd0f91e363fc32904d5f098e56c16f6bfc494738;p=thirdparty%2Fapache%2Fhttpd.git * 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 --- diff --git a/modules/proxy/mod_proxy_ajp.c b/modules/proxy/mod_proxy_ajp.c index 0fb5984be02..4988bbc53ca 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;