httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r660207 - /httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c
Date Mon, 26 May 2008 15:04:57 GMT
Author: rpluem
Date: Mon May 26 08:04:55 2008
New Revision: 660207

URL: http://svn.apache.org/viewvc?rev=660207&view=rev
Log:
* Introduce a flag to decide whether we sent an body to the backend or not.

Modified:
    httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c

Modified: httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c?rev=660207&r1=660206&r2=660207&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c Mon May 26 08:04:55 2008
@@ -165,6 +165,7 @@
     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 @@
                 return HTTP_INTERNAL_SERVER_ERROR;
             }
             conn->worker->s->transferred += bufsiz;
+            send_body = 1;
         }
     }
 
@@ -295,7 +297,7 @@
          * 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;



Mime
View raw message