altarch-user / rpms / httpd

Forked from rpms/httpd 2 years ago
Clone

Blame SOURCES/httpd-2.4.6-r1805099.patch

b19d6e
diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c
b19d6e
index b10be15..506a046 100644
b19d6e
--- a/modules/proxy/mod_proxy.c
b19d6e
+++ b/modules/proxy/mod_proxy.c
b19d6e
@@ -1320,6 +1320,7 @@ static void *create_proxy_dir_config(apr_pool_t *p, char *dummy)
b19d6e
     new->error_override = 0;
b19d6e
     new->error_override_set = 0;
b19d6e
     new->add_forwarded_headers = 1;
b19d6e
+    new->add_forwarded_headers_set = 0;
b19d6e
 
b19d6e
     return (void *) new;
b19d6e
 }
b19d6e
@@ -1350,7 +1351,12 @@ static void *merge_proxy_dir_config(apr_pool_t *p, void *basev, void *addv)
b19d6e
     new->error_override_set = add->error_override_set || base->error_override_set;
b19d6e
     new->alias = (add->alias_set == 0) ? base->alias : add->alias;
b19d6e
     new->alias_set = add->alias_set || base->alias_set;
b19d6e
-    new->add_forwarded_headers = add->add_forwarded_headers;
b19d6e
+    new->add_forwarded_headers =
b19d6e
+        (add->add_forwarded_headers_set == 0) ? base->add_forwarded_headers
b19d6e
+        : add->add_forwarded_headers;
b19d6e
+    new->add_forwarded_headers_set = add->add_forwarded_headers_set
b19d6e
+        || base->add_forwarded_headers_set;
b19d6e
+
b19d6e
     return new;
b19d6e
 }
b19d6e
 
b19d6e
@@ -1837,6 +1843,7 @@ static const char *
b19d6e
 {
b19d6e
    proxy_dir_conf *conf = dconf;
b19d6e
    conf->add_forwarded_headers = flag;
b19d6e
+   conf->add_forwarded_headers_set = 1;
b19d6e
    return NULL;
b19d6e
 }
b19d6e
 static const char *
b19d6e
diff --git a/modules/proxy/mod_proxy.h b/modules/proxy/mod_proxy.h
b19d6e
index 06f2b17..8c76d4c 100644
b19d6e
--- a/modules/proxy/mod_proxy.h
b19d6e
+++ b/modules/proxy/mod_proxy.h
b19d6e
@@ -219,6 +219,7 @@ typedef struct {
b19d6e
     unsigned int error_override_set:1;
b19d6e
     unsigned int alias_set:1;
b19d6e
     unsigned int add_forwarded_headers:1;
b19d6e
+    unsigned int add_forwarded_headers_set:1;
b19d6e
 } proxy_dir_conf;
b19d6e
 
b19d6e
 /* if we interpolate env vars per-request, we'll need a per-request