]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Merge r1153531 from trunk:
authorRuediger Pluem <rpluem@apache.org>
Thu, 8 Sep 2011 10:31:44 +0000 (10:31 +0000)
committerRuediger Pluem <rpluem@apache.org>
Thu, 8 Sep 2011 10:31:44 +0000 (10:31 +0000)
* 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.

PR: 51608
Submitted by: rpluem
Reviewed by: rpluem, jim, jfclere

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@1166611 13f79535-47bb-0310-9956-ffa450edef68

CHANGES
STATUS
modules/proxy/mod_proxy_ajp.c

diff --git a/CHANGES b/CHANGES
index d8948175f62941947c1732184411afac504968e3..0f9449006973b2289322d28e9c56e43533843390 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,9 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.2.21
 
+  *) mod_proxy_ajp: Ignore flushing if headers have not been sent.
+     PR 51608 [Ruediger Pluem]
+
   *) Fix a regression in the CVE-2011-3192 byterange fix.
      PR 51748. [low_priority <lowprio20 gmail.com>]
 
diff --git a/STATUS b/STATUS
index 884b42ddbebf28431eda9b6715ecbde8788dd432..b3e27ae217024c29e083aac0bd599bd28ca94580 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -102,11 +102,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
                (Accept-Range: changeset in separate proposal below)
     +1: covener, wrowe, rpluem
 
-  * mod_proxy_ajp: Ignore flushing if headers have not been sent.
-    Trunk patch: http://svn.apache.org/viewvc?rev=1153531&view=rev
-    2.2.x patch: http://people.apache.org/~rpluem/patches/51608.diff
-    +1: rpluem, jim, jfclere
-
  PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
 
index 1b1fdf650e2df2d33b067bf642be1dc1471b6ea6..0d8095fa598bd97461390f39cb66ad09c991a611 100644 (file)
@@ -470,16 +470,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 {
                     backend_failed = 1;