httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r617686 - in /httpd/httpd/branches/2.2.x: CHANGES STATUS modules/proxy/mod_proxy_http.c
Date Fri, 01 Feb 2008 22:42:14 GMT
Author: rpluem
Date: Fri Feb  1 14:42:08 2008
New Revision: 617686

URL: http://svn.apache.org/viewvc?rev=617686&view=rev
Log:
Merge r616517, r617653 from trunk:

* Fix processing of chunked responses if Connection: Transfer-Encoding is
  set in the response of the proxied system.

PR: 44311
Submitted by: rpluem
Reviewed by: jim, rpluem, mturk

Modified:
    httpd/httpd/branches/2.2.x/CHANGES
    httpd/httpd/branches/2.2.x/STATUS
    httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_http.c

Modified: httpd/httpd/branches/2.2.x/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/CHANGES?rev=617686&r1=617685&r2=617686&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/CHANGES [utf-8] (original)
+++ httpd/httpd/branches/2.2.x/CHANGES [utf-8] Fri Feb  1 14:42:08 2008
@@ -1,6 +1,10 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache 2.2.9
 
+  *) mod_proxy_http: Fix processing of chunked responses if
+     Connection: Transfer-Encoding is set in the response of the proxied
+     system. PR 44311 [Ruediger Pluem]
+
   *) mod_rewrite: Don't canonicalise URLs with [P,NE]
      PR 43319 [<rahul sun.com>]
 

Modified: httpd/httpd/branches/2.2.x/STATUS
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/STATUS?rev=617686&r1=617685&r2=617686&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/STATUS (original)
+++ httpd/httpd/branches/2.2.x/STATUS Fri Feb  1 14:42:08 2008
@@ -91,16 +91,6 @@
       wrowe notes; Win32 is already ready for this, and there's no rush
       to push this into the immediate next-release.
 
-  * mod_proxy: Fix processing of chunked responses if
-    Connection: Transfer-Encoding is set in the response of the
-    proxied system.  PR: 44311
-      Trunk version of patch:
-       http://svn.apache.org/viewvc?view=rev&revision=616517
-       http://svn.apache.org/viewvc?view=rev&revision=617653
-      Backport version of 2.2.x of patch:
-       Trunk version works (minus CHANGES conflict)
-    +1: jim, rpluem, mturk
-
 PATCHES PROPOSED TO BACKPORT FROM TRUNK:
   [ New proposals should be added at the end of the list ]
 

Modified: httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_http.c
URL: http://svn.apache.org/viewvc/httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_http.c?rev=617686&r1=617685&r2=617686&view=diff
==============================================================================
--- httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_http.c (original)
+++ httpd/httpd/branches/2.2.x/modules/proxy/mod_proxy_http.c Fri Feb  1 14:42:08 2008
@@ -1331,6 +1331,7 @@
     static const char *hop_by_hop_hdrs[] =
         {"Keep-Alive", "Proxy-Authenticate", "TE", "Trailer", "Upgrade", NULL};
     int i;
+    const char *te = NULL;
 
     bb = apr_brigade_create(p, c->bucket_alloc);
 
@@ -1461,6 +1462,11 @@
                 backend->close += 1;
             }
 
+            /*
+             * Save a possible Transfer-Encoding header as we need it later for
+             * ap_http_filter to know where to end.
+             */
+            te = apr_table_get(r->headers_out, "Transfer-Encoding");
             /* strip connection listed hop-by-hop headers from response */
             backend->close += ap_proxy_liststr(apr_table_get(r->headers_out,
                                                              "Connection"),
@@ -1601,6 +1607,14 @@
              * ap_http_filter to know where to end.
              */
             rp->headers_in = apr_table_copy(r->pool, r->headers_out);
+            /*
+             * Restore Transfer-Encoding header from response if we saved
+             * one before and there is none left. We need it for the
+             * ap_http_filter. See above.
+             */
+            if (te && !apr_table_get(rp->headers_in, "Transfer-Encoding")) {
+                apr_table_add(rp->headers_in, "Transfer-Encoding", te);
+            }
 
             apr_table_unset(r->headers_out,"Transfer-Encoding");
 



Mime
View raw message