mirror of
https://github.com/apache/httpd.git
synced 2025-08-08 15:02:10 +03:00
Allow ProxyPreserveHost to work in <Proxy> sections
PR: 34901 git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@824072 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
@@ -693,7 +693,9 @@ int ap_proxy_http_request(apr_pool_t *p, request_rec *r,
|
||||
apr_off_t bytes;
|
||||
int force10, rv;
|
||||
apr_table_t *headers_in_copy;
|
||||
proxy_dir_conf *dconf;
|
||||
|
||||
dconf = ap_get_module_config(r->per_dir_config, &proxy_module);
|
||||
header_brigade = apr_brigade_create(p, origin->bucket_alloc);
|
||||
|
||||
/*
|
||||
@@ -723,7 +725,7 @@ int ap_proxy_http_request(apr_pool_t *p, request_rec *r,
|
||||
ap_xlate_proto_to_ascii(buf, strlen(buf));
|
||||
e = apr_bucket_pool_create(buf, strlen(buf), p, c->bucket_alloc);
|
||||
APR_BRIGADE_INSERT_TAIL(header_brigade, e);
|
||||
if (conf->preserve_host == 0) {
|
||||
if (dconf->preserve_host == 0) {
|
||||
if (ap_strchr_c(uri->hostname, ':')) { /* if literal IPv6 address */
|
||||
if (uri->port_str && uri->port != DEFAULT_HTTP_PORT) {
|
||||
buf = apr_pstrcat(p, "Host: [", uri->hostname, "]:",
|
||||
|
Reference in New Issue
Block a user