altarch-user / rpms / httpd

Forked from rpms/httpd 2 years ago
Clone

Blame SOURCES/httpd-2.4.6-r1805099.patch

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