]> granicus.if.org Git - apache/commitdiff
* Introduce a flag to decide whether we sent an body to the backend or not.
authorRuediger Pluem <rpluem@apache.org>
Mon, 26 May 2008 15:04:55 +0000 (15:04 +0000)
committerRuediger Pluem <rpluem@apache.org>
Mon, 26 May 2008 15:04:55 +0000 (15:04 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@660207 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy_ajp.c

index 0fb5984be02b745a2713b637aa4a487dc73bc6b1..4988bbc53ca7fcb9e813728444b608302a0b738f 100644 (file)
@@ -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;