httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mt...@apache.org
Subject cvs commit: httpd-2.0/modules/proxy mod_proxy.c
Date Thu, 09 Sep 2004 10:24:27 GMT
mturk       2004/09/09 03:24:27

  Modified:    modules/proxy mod_proxy.c
  Log:
  Add 'default' foward proxy worker to the proxy_server_conf.
  Forward worker is constructed on ProxyRequests directive
  with sceme and host equals '*', meaning all.
  
  Revision  Changes    Path
  1.138     +11 -0     httpd-2.0/modules/proxy/mod_proxy.c
  
  Index: mod_proxy.c
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/mod_proxy.c,v
  retrieving revision 1.137
  retrieving revision 1.138
  diff -u -r1.137 -r1.138
  --- mod_proxy.c	26 Aug 2004 21:10:01 -0000	1.137
  +++ mod_proxy.c	9 Sep 2004 10:24:27 -0000	1.138
  @@ -695,6 +695,7 @@
       ps->allowed_connect_ports = apr_array_make(p, 10, sizeof(int));
       ps->workers = apr_array_make(p, 10, sizeof(proxy_worker));
       ps->balancers = apr_array_make(p, 10, sizeof(proxy_balancer));
  +    ps->forward = NULL;
       ps->domain = NULL;
       ps->viaopt = via_off; /* initially backward compatible with 1.3.1 */
       ps->viaopt_set = 0; /* 0 means default */
  @@ -739,6 +740,7 @@
       ps->allowed_connect_ports = apr_array_append(p, base->allowed_connect_ports,
overrides->allowed_connect_ports);
       ps->workers = apr_array_append(p, base->workers, overrides->workers);
       ps->balancers = apr_array_append(p, base->balancers, overrides->balancers);
  +    ps->forward = overrides->forward ? overrides->forward : base->forward;
   
       ps->domain = (overrides->domain == NULL) ? base->domain : overrides->domain;
       ps->viaopt = (overrides->viaopt_set == 0) ? base->viaopt : overrides->viaopt;
  @@ -1112,13 +1114,22 @@
   static const char *
       set_proxy_req(cmd_parms *parms, void *dummy, int flag)
   {
  +    const char *err;
       proxy_server_conf *psf =
       ap_get_module_config(parms->server->module_config, &proxy_module);
   
       psf->req = flag;
       psf->req_set = 1;
  +    /* Add default forward proxy worker */
  +    if ((err = ap_proxy_add_worker(&(psf->forward), parms->pool,
  +                                   psf, "*://*:0"))) {
  +        return apr_pstrcat(parms->temp_pool, "ProxyRequests ", err, NULL); 
  +    }
  +        
  +
       return NULL;
   }
  +
   static const char *
       set_proxy_error_override(cmd_parms *parms, void *dummy, int flag)
   {
  
  
  

Mime
View raw message