1
0
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:
Stefan Fritsch
2009-10-11 13:38:51 +00:00
parent 134bf4f948
commit 3fa2c0e208
6 changed files with 23 additions and 15 deletions

View File

@@ -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, "]:",