mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
* Fix processing of chunked responses if Connection: Transfer-Encoding is
set in the response of the proxied system. PR: 44311 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@616517 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
4
CHANGES
4
CHANGES
@@ -2,6 +2,10 @@
|
|||||||
Changes with Apache 2.3.0
|
Changes with Apache 2.3.0
|
||||||
[ When backported to 2.2.x, remove entry from this file ]
|
[ When backported to 2.2.x, remove entry from this file ]
|
||||||
|
|
||||||
|
*) 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]
|
||||||
|
|
||||||
*) ProxyPassReverse is now balancer aware. [Jim Jagielski]
|
*) ProxyPassReverse is now balancer aware. [Jim Jagielski]
|
||||||
|
|
||||||
*) rotatelogs: Don't leak memory when reopening the logfile.
|
*) rotatelogs: Don't leak memory when reopening the logfile.
|
||||||
|
@@ -1331,6 +1331,7 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
|
|||||||
static const char *hop_by_hop_hdrs[] =
|
static const char *hop_by_hop_hdrs[] =
|
||||||
{"Keep-Alive", "Proxy-Authenticate", "TE", "Trailer", "Upgrade", NULL};
|
{"Keep-Alive", "Proxy-Authenticate", "TE", "Trailer", "Upgrade", NULL};
|
||||||
int i;
|
int i;
|
||||||
|
const char *te = NULL;
|
||||||
|
|
||||||
bb = apr_brigade_create(p, c->bucket_alloc);
|
bb = apr_brigade_create(p, c->bucket_alloc);
|
||||||
|
|
||||||
@@ -1461,6 +1462,11 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
|
|||||||
backend->close += 1;
|
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 */
|
/* strip connection listed hop-by-hop headers from response */
|
||||||
backend->close += ap_proxy_liststr(apr_table_get(r->headers_out,
|
backend->close += ap_proxy_liststr(apr_table_get(r->headers_out,
|
||||||
"Connection"),
|
"Connection"),
|
||||||
@@ -1601,6 +1607,14 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
|
|||||||
* ap_http_filter to know where to end.
|
* ap_http_filter to know where to end.
|
||||||
*/
|
*/
|
||||||
rp->headers_in = apr_table_copy(r->pool, r->headers_out);
|
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 below.
|
||||||
|
*/
|
||||||
|
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");
|
apr_table_unset(r->headers_out,"Transfer-Encoding");
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user