You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rp...@apache.org on 2005/12/11 01:50:24 UTC
svn commit: r355837 - /httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c
Author: rpluem
Date: Sat Dec 10 16:50:21 2005
New Revision: 355837
URL: http://svn.apache.org/viewcvs?rev=355837&view=rev
Log:
* Let the proxy handler know that the backend connection broke after we have
sent the headers.
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/viewcvs/httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c?rev=355837&r1=355836&r2=355837&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c Sat Dec 10 16:50:21 2005
@@ -138,6 +138,7 @@
int havebody = 1;
int isok = 1;
apr_off_t bb_len;
+ int data_sent = 0;
#ifdef FLUSHING_BANDAID
apr_int32_t conn_poll_fd;
apr_pollfd_t *conn_poll;
@@ -348,6 +349,8 @@
"proxy: error processing body");
isok = 0;
}
+ /* memorize that we sent data */
+ data_sent = 1;
apr_brigade_cleanup(output_brigade);
}
else {
@@ -363,6 +366,8 @@
"proxy: error processing body");
isok = 0;
}
+ /* memorize that we sent data */
+ data_sent = 1;
break;
default:
isok = 0;
@@ -409,7 +414,15 @@
"proxy: send body failed to %pI (%s)",
conn->worker->cp->addr,
conn->worker->hostname);
- return HTTP_SERVICE_UNAVAILABLE;
+ /*
+ * If we have sent data (and thus the headers) we must let the
+ * others know.
+ */
+ if (data_sent) {
+ return PROXY_BACKEND_BROKEN;
+ } else {
+ return HTTP_SERVICE_UNAVAILABLE;
+ }
}
/* Nice we have answer to send to the client */