From a224ba752c76746d8b53cbfc973ff0a2779e8918 Mon Sep 17 00:00:00 2001 From: Mladen Turk Date: Thu, 26 Aug 2004 06:49:22 +0000 Subject: [PATCH] Add pool used for allocating proxy_server_conf to that struct. It will be used for dynamic configuration, to ensure that dynamic params has the same lifetime as the config has. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@104811 13f79535-47bb-0310-9956-ffa450edef68 --- modules/proxy/mod_proxy.c | 3 ++- modules/proxy/mod_proxy.h | 10 +++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/modules/proxy/mod_proxy.c b/modules/proxy/mod_proxy.c index 3d61c85a01f..07ada90b83a 100644 --- a/modules/proxy/mod_proxy.c +++ b/modules/proxy/mod_proxy.c @@ -714,6 +714,7 @@ static void * create_proxy_config(apr_pool_t *p, server_rec *s) ps->timeout_set = 0; ps->badopt = bad_error; ps->badopt_set = 0; + ps->pool = p; return ps; } @@ -749,7 +750,7 @@ static void * merge_proxy_config(apr_pool_t *p, void *basev, void *overridesv) ps->preserve_host = (overrides->preserve_host_set == 0) ? base->preserve_host : overrides->preserve_host; ps->timeout= (overrides->timeout_set == 0) ? base->timeout : overrides->timeout; ps->badopt = (overrides->badopt_set == 0) ? base->badopt : overrides->badopt; - + ps->pool = p; return ps; } diff --git a/modules/proxy/mod_proxy.h b/modules/proxy/mod_proxy.h index 1a4ce09696a..fea0c73e567 100644 --- a/modules/proxy/mod_proxy.h +++ b/modules/proxy/mod_proxy.h @@ -96,7 +96,7 @@ struct proxy_remote { const char *hostname; /* the hostname of this proxy */ apr_port_t port; /* the port for this proxy */ regex_t *regexp; /* compiled regex (if any) for the remote */ - int use_regex; /* simple boolean. True if we have a regex pattern */ + int use_regex; /* simple boolean. True if we have a regex pattern */ }; struct proxy_alias { @@ -127,7 +127,7 @@ typedef struct { apr_array_header_t *workers; apr_array_header_t *balancers; const char *domain; /* domain name to use in absence of a domain name in the request */ - int req; /* true if proxy requests are enabled */ + int req; /* true if proxy requests are enabled */ char req_set; enum { via_off, @@ -176,7 +176,7 @@ typedef struct { status_full } proxy_status; /* Status display options */ char proxy_status_set; - + apr_pool_t *pool; /* Pool used for allocating this struct */ } proxy_server_conf; typedef struct proxy_balancer proxy_balancer; @@ -359,9 +359,9 @@ PROXY_DECLARE(request_rec *)ap_proxy_make_fake_req(conn_rec *c, request_rec *r); PROXY_DECLARE(int) ap_proxy_hex2c(const char *x); PROXY_DECLARE(void) ap_proxy_c2hex(int ch, char *x); PROXY_DECLARE(char *)ap_proxy_canonenc(apr_pool_t *p, const char *x, int len, enum enctype t, - int isenc); + int isenc); PROXY_DECLARE(char *)ap_proxy_canon_netloc(apr_pool_t *p, char **const urlp, char **userp, - char **passwordp, char **hostp, apr_port_t *port); + char **passwordp, char **hostp, apr_port_t *port); PROXY_DECLARE(const char *)ap_proxy_date_canon(apr_pool_t *p, const char *x); PROXY_DECLARE(int) ap_proxy_liststr(const char *list, const char *val); PROXY_DECLARE(char *)ap_proxy_removestr(apr_pool_t *pool, const char *list, const char *val); -- 2.47.2