httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From minf...@apache.org
Subject cvs commit: httpd-proxy/module-2.0 mod_proxy.c mod_proxy.h
Date Sat, 10 Mar 2001 21:19:22 GMT
minfrin     01/03/10 13:19:22

  Modified:    module-2.0 mod_proxy.c mod_proxy.h
  Log:
  Virtual host config file fix backported from v1.3
  
  Revision  Changes    Path
  1.23      +30 -1     httpd-proxy/module-2.0/mod_proxy.c
  
  Index: mod_proxy.c
  ===================================================================
  RCS file: /home/cvs/httpd-proxy/module-2.0/mod_proxy.c,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- mod_proxy.c	2001/02/08 07:44:09	1.22
  +++ mod_proxy.c	2001/03/10 21:19:21	1.23
  @@ -421,12 +421,38 @@
       ps->cache_completion = DEFAULT_CACHE_COMPLETION;
       ps->domain = NULL;
       ps->viaopt = via_off; /* initially backward compatible with 1.3.1 */
  +    ps->viaopt_set = 0; /* 0 means default */
       ps->req = 0;
  +    ps->req_set = 0;
  +    ps->recv_buffer_size = 0; /* this default was left unset for some reason */
  +    ps->recv_buffer_size_set = 0;
   
       ap_cache_init(&ps->cache, "mod_proxy cache", s);
       return ps;
   }
   
  +static void * merge_proxy_config(apr_pool_t *p, void *basev, void *overridesv)
  +{
  +    proxy_server_conf *ps = ap_pcalloc(p, sizeof(proxy_server_conf));
  +    proxy_server_conf *base = (proxy_server_conf *) basev;
  +    proxy_server_conf *overrides = (proxy_server_conf *) overridesv;
  +
  +    ps->proxies = ap_append_arrays(p, base->proxies, overrides->proxies);
  +    ps->aliases = ap_append_arrays(p, base->aliases, overrides->aliases);
  +    ps->raliases = ap_append_arrays(p, base->raliases, overrides->raliases);
  +    ps->noproxies = ap_append_arrays(p, base->noproxies, overrides->noproxies);
  +    ps->dirconn = ap_append_arrays(p, base->dirconn, overrides->dirconn);
  +    ps->nocaches = ap_append_arrays(p, base->nocaches, overrides->nocaches);
  +    ps->allowed_connect_ports = ap_append_arrays(p, base->allowed_connect_ports,
overrides->allowed_connect_ports);
  +
  +    ps->domain = (overrides->domain == NULL) ? base->domain : overrides->domain;
  +    ps->viaopt = (overrides->viaopt_set == 0) ? base->viaopt : overrides->viaopt;
  +    ps->req = (overrides->req_set == 0) ? base->req : overrides->req;
  +    ps->recv_buffer_size = (overrides->recv_buffer_size_set == 0) ? base->recv_buffer_size
: overrides->recv_buffer_size;
  +
  +    return ps;
  +}
  +
   static const char *
       add_proxy(cmd_parms *cmd, void *dummy, const char *f1, const char *r1)
   {
  @@ -659,6 +685,7 @@
       ap_get_module_config(parms->server->module_config, &proxy_module);
   
       psf->req = flag;
  +    psf->req_set = 1;
       return NULL;
   }
   
  @@ -673,6 +700,7 @@
       }
   
       psf->recv_buffer_size = s;
  +    psf->recv_buffer_size_set = 1;
       return NULL;
   }
   
  @@ -695,6 +723,7 @@
                  "off | on | full | block";
       }
   
  +    psf->viaopt_set = 1;
       return NULL;    
   }
   
  @@ -760,7 +789,7 @@
       NULL,			/* create per-directory config structure */
       NULL,			/* merge per-directory config structures */
       create_proxy_config,	/* create per-server config structure */
  -    NULL,			/* merge per-server config structures */
  +    merge_proxy_config,		/* merge per-server config structures */
       proxy_cmds,			/* command table */
       register_hooks
   };
  
  
  
  1.27      +3 -0      httpd-proxy/module-2.0/mod_proxy.h
  
  Index: mod_proxy.h
  ===================================================================
  RCS file: /home/cvs/httpd-proxy/module-2.0/mod_proxy.h,v
  retrieving revision 1.26
  retrieving revision 1.27
  diff -u -r1.26 -r1.27
  --- mod_proxy.h	2001/02/12 09:20:03	1.26
  +++ mod_proxy.h	2001/03/10 21:19:21	1.27
  @@ -184,6 +184,7 @@
       apr_array_header_t *allowed_connect_ports;
       const char *domain;		/* domain name to use in absence of a domain name in the request
*/
       int req;			/* true if proxy requests are enabled */
  +    char req_set;
       float cache_completion;     /* Force cache completion after this point */
       enum {
         via_off,
  @@ -191,7 +192,9 @@
         via_block,
         via_full
       } viaopt;                   /* how to deal with proxy Via: headers */
  +    char viaopt_set;
       size_t recv_buffer_size;
  +    char recv_buffer_size_set;
       ap_cache_handle_t *cache;
   } proxy_server_conf;
   
  
  
  

Mime
View raw message