summaryrefslogtreecommitdiff
path: root/modules/proxy
diff options
context:
space:
mode:
Diffstat (limited to 'modules/proxy')
-rw-r--r--modules/proxy/mod_proxy.c9
-rw-r--r--modules/proxy/mod_proxy.h1
2 files changed, 9 insertions, 1 deletions
diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c
index f6fb473ed1..9f5a3ae279 100644
--- a/modules/proxy/mod_proxy.c
+++ b/modules/proxy/mod_proxy.c
@@ -1451,6 +1451,7 @@ static void *create_proxy_dir_config(apr_pool_t *p, char *dummy)
new->error_override = 0;
new->error_override_set = 0;
new->add_forwarded_headers = 1;
+ new->add_forwarded_headers_set = 0;
return (void *) new;
}
@@ -1482,7 +1483,12 @@ static void *merge_proxy_dir_config(apr_pool_t *p, void *basev, void *addv)
new->error_override_set = add->error_override_set || base->error_override_set;
new->alias = (add->alias_set == 0) ? base->alias : add->alias;
new->alias_set = add->alias_set || base->alias_set;
- new->add_forwarded_headers = add->add_forwarded_headers;
+ new->add_forwarded_headers =
+ (add->add_forwarded_headers_set == 0) ? base->add_forwarded_headers
+ : add->add_forwarded_headers;
+ new->add_forwarded_headers_set = add->add_forwarded_headers_set
+ || base->add_forwarded_headers_set;
+
return new;
}
@@ -1970,6 +1976,7 @@ static const char *
{
proxy_dir_conf *conf = dconf;
conf->add_forwarded_headers = flag;
+ conf->add_forwarded_headers_set = 1;
return NULL;
}
static const char *
diff --git a/modules/proxy/mod_proxy.h b/modules/proxy/mod_proxy.h
index 8a0ad10259..4f31bed389 100644
--- a/modules/proxy/mod_proxy.h
+++ b/modules/proxy/mod_proxy.h
@@ -235,6 +235,7 @@ typedef struct {
unsigned int error_override_set:1;
unsigned int alias_set:1;
unsigned int add_forwarded_headers:1;
+ unsigned int add_forwarded_headers_set:1;
/** Named back references */
apr_array_header_t *refs;