Commit c43f161a authored by Joe Orton's avatar Joe Orton
Browse files

Fix ProxyAddHeaders merging.

* modules/proxy/mod_proxy.h:
  Add add_forwarded_headers_set field to proxy_dir_conf.

* modules/proxy/mod_proxy.c (create_proxy_dir_config, ):
  Initialize add_forwarded_headers_set.
  (add_proxy_http_headers): Set it.
  (merge_proxy_dir_config): Merge add_forwarded_headers correctly.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1805099 13f79535-47bb-0310-9956-ffa450edef68
parent 2b580f96
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
                                                         -*- coding: utf-8 -*-
Changes with Apache 2.5.0

  *) mod_proxy: Fix ProxyAddHeaders merging.  [Joe Orton]

  *) mod_md: new module for managing domains across VirtualHosts with ACME protocol 
     implementation for automated certificate signup and renewal. Default CA is
     the test area of Let's Encrypt right now, so certificates root will not be valid.
+8 −1
Original line number Diff line number Diff line
@@ -1568,6 +1568,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;
}
@@ -1599,7 +1600,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;
}

@@ -2102,6 +2108,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 *
+1 −0
Original line number Diff line number Diff line
@@ -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;