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 2011/08/03 17:07:30 UTC

svn commit: r1153531 - /httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c

Author: rpluem
Date: Wed Aug  3 15:07:29 2011
New Revision: 1153531

URL: http://svn.apache.org/viewvc?rev=1153531&view=rev
Log:
* Do not even sent an empty brigade down the filter chain if the headers
  have not been sent by the AJP server so far. Even an empty brigade
  will trigger the headers filter to create the (in this case incomplete)
  HTTP headers of the response.

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=1153531&r1=1153530&r2=1153531&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c (original)
+++ httpd/httpd/trunk/modules/proxy/mod_proxy_ajp.c Wed Aug  3 15:07:29 2011
@@ -509,16 +509,18 @@ static int ap_proxy_ajp_request(apr_pool
                             if (bb_len != -1)
                                 conn->worker->s->read += bb_len;
                         }
-                        if (ap_pass_brigade(r->output_filters,
-                                            output_brigade) != APR_SUCCESS) {
-                            ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
-                                          "proxy: error processing body.%s",
-                                          r->connection->aborted ?
-                                          " Client aborted connection." : "");
-                            output_failed = 1;
+                        if (headers_sent) {
+                            if (ap_pass_brigade(r->output_filters,
+                                                output_brigade) != APR_SUCCESS) {
+                                ap_log_rerror(APLOG_MARK, APLOG_DEBUG, 0, r,
+                                              "proxy: error processing body.%s",
+                                              r->connection->aborted ?
+                                              " Client aborted connection." : "");
+                                output_failed = 1;
+                            }
+                            data_sent = 1;
+                            apr_brigade_cleanup(output_brigade);
                         }
-                        data_sent = 1;
-                        apr_brigade_cleanup(output_brigade);
                     }
                 }
                 else {