]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
* Do not even sent an empty brigade down the filter chain if the headers
authorRuediger Pluem <rpluem@apache.org>
Wed, 3 Aug 2011 15:07:29 +0000 (15:07 +0000)
committerRuediger Pluem <rpluem@apache.org>
Wed, 3 Aug 2011 15:07:29 +0000 (15:07 +0000)
  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.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1153531 13f79535-47bb-0310-9956-ffa450edef68

modules/proxy/mod_proxy_ajp.c

index b17d7ae39a2fc9944a8d7facd10bd1d0c36c58d2..12cb6fc605de97cee20b3c97bd19d3a5a2fc5391 100644 (file)
@@ -509,16 +509,18 @@ static int ap_proxy_ajp_request(apr_pool_t *p, request_rec *r,
                             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 {