]> granicus.if.org Git - apache/commitdiff
Merge r1585824 from trunk:
authorJim Jagielski <jim@apache.org>
Tue, 15 Apr 2014 19:13:30 +0000 (19:13 +0000)
committerJim Jagielski <jim@apache.org>
Tue, 15 Apr 2014 19:13:30 +0000 (19:13 +0000)
mod_proxy_fcgi: Fix sending of response without some HTTP headers
that might be set by filters.

The problem occurs when no body bytes were read while reading the
response headers, resulting in an empty brigade being sent down
the filter stack.  One particualr filter that mishandles the empty
initial brigade is mod_deflate.  It neglects to add to the response
header fields.

PR: 55558
Submitted by: Jim Riggs <jim riggs.me>
Reviewed by: trawick

Submitted by: trawick
Reviewed/backported by: jim

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

CHANGES
STATUS
modules/proxy/mod_proxy_fcgi.c

diff --git a/CHANGES b/CHANGES
index 16e961ebd3e05db7a2bf84c57b85f06a5ee50ded..04f18665011b44321f622545039989eda36f9765 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,9 @@
 
 Changes with Apache 2.4.10
 
+  *) mod_proxy_fcgi: Fix sending of response without some HTTP headers
+     that might be set by filters.  [Jim Riggs <jim riggs.me>]
+
   *) mod_proxy_html: Do not delete the wrong data from HTML code when a
      "http-equiv" meta tag specifies a Content-Type behind any other
      "http-equiv" meta tag. PR 56287 [Micha Lenk <micha lenk info>]
diff --git a/STATUS b/STATUS
index b86823c60c01d18ec2029c6b0d8a7684fa391346..1b240eabb3651dc32f33a9a1fb611dd15df8f263 100644 (file)
--- a/STATUS
+++ b/STATUS
@@ -121,12 +121,6 @@ PATCHES ACCEPTED TO BACKPORT FROM TRUNK:
      2.4.x patch: http://people.apache.org/~trawick/suspend_resume_24.txt
      +1: trawick, jim, ylavic
 
-   * mod_proxy_fcgi: Fix for oddity with mod_proxy_fcgi which can bork
-     response headers for mod_deflate-ed responses.
-     trunk patch? http://svn.apache.org/r1585824
-     2.4.x patch: trunk works (modulo CHANGES)
-     +1: trawick, jim, ylavic
-
 
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
index 4f4079519eff30fd867a53d71bb7be90c4ad6e92..dd2607c34422bf2407b156ee777ef94c593a3953 100644 (file)
@@ -591,7 +591,11 @@ recv_again:
                                 r->status = HTTP_OK;
                             }
 
-                            if (script_error_status == HTTP_OK) {
+                            if (script_error_status == HTTP_OK
+                                && !APR_BRIGADE_EMPTY(ob)) {
+                                /* Send the part of the body that we read while
+                                 * reading the headers.
+                                 */
                                 rv = ap_pass_brigade(r->output_filters, ob);
                                 if (rv != APR_SUCCESS) {
                                     break;