mirror of
https://github.com/apache/httpd.git
synced 2025-08-07 04:02:58 +03:00
Strip hop-by-hop headers in proxy response
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@580044 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -1229,6 +1229,9 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
|
||||
int pread_len = 0;
|
||||
apr_table_t *save_table;
|
||||
int backend_broke = 0;
|
||||
static const char *hop_by_hop_hdrs[] =
|
||||
{"Keep-Alive", "Proxy-Authenticate", "TE", "Trailers", "Upgrade", NULL};
|
||||
int i;
|
||||
|
||||
bb = apr_brigade_create(p, c->bucket_alloc);
|
||||
|
||||
@@ -1369,6 +1372,11 @@ apr_status_t ap_proxy_http_process_response(apr_pool_t * p, request_rec *r,
|
||||
}
|
||||
ap_proxy_pre_http_request(origin,rp);
|
||||
|
||||
/* Clear hop-by-hop headers */
|
||||
for (i=0; hop_by_hop_hdrs[i]; ++i) {
|
||||
apr_table_unset(r->headers_out, hop_by_hop_hdrs[i]);
|
||||
}
|
||||
|
||||
/* handle Via header in response */
|
||||
if (conf->viaopt != via_off && conf->viaopt != via_block) {
|
||||
const char *server_name = ap_get_server_name(r);
|
||||
|
Reference in New Issue
Block a user