httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject cvs commit: httpd-2.0/modules/proxy mod_proxy.c mod_proxy.h
Date Wed, 11 Aug 2004 22:48:13 GMT
wrowe       2004/08/11 15:48:13

  Modified:    modules/proxy mod_proxy.c mod_proxy.h
  Log:
  Fix some config checking params.
  Added route and route redirect to the runtime worker.
  
  Submitted by: mturk
  
  Revision  Changes    Path
  1.124     +9 -9      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.123
  retrieving revision 1.124
  diff -u -r1.123 -r1.124
  --- mod_proxy.c	11 Aug 2004 22:41:02 -0000	1.123
  +++ mod_proxy.c	11 Aug 2004 22:48:13 -0000	1.124
  @@ -856,7 +856,7 @@
               char *val = strchr(word, '=');
               if (!val) {
                   if (cmd->path)
  -                    return "Invalid ProxyPass parameter. Paramet must be in the form key=value";
  +                    return "Invalid ProxyPass parameter. Paramet must be in the form 'key=value'";
                   else
                       return "ProxyPass can not have a path when defined in a location";

               }
  @@ -883,12 +883,12 @@
                                                       cmd->pool,
                                                       conf, r);
               if (err)
  -                return apr_pstrcat(cmd->temp_pool, "BalancerMember: ", err, NULL);
  +                return apr_pstrcat(cmd->temp_pool, "ProxyPass ", err, NULL);
           }        
           for (i = 0; i < arr->nelts; i++) {
               const char *err = set_balancer_param(balancer, elts[i].key, elts[i].val);
               if (err)
  -                return apr_pstrcat(cmd->temp_pool, "ProxyPass: ", err, NULL);
  +                return apr_pstrcat(cmd->temp_pool, "ProxyPass ", err, NULL);
           }
       }
       else {
  @@ -896,14 +896,14 @@
           if (!worker) {
               const char *err = ap_proxy_add_worker(&worker, cmd->pool, conf, r);
               if (err)
  -                return apr_pstrcat(cmd->temp_pool, "ProxyPass: ", err, NULL);
  +                return apr_pstrcat(cmd->temp_pool, "ProxyPass ", err, NULL);
           }
           PROXY_COPY_CONF_PARAMS(worker, conf);
   
           for (i = 0; i < arr->nelts; i++) {
               const char *err = set_worker_param(worker, elts[i].key, elts[i].val);
               if (err)
  -                return apr_pstrcat(cmd->temp_pool, "ProxyPass: ", err, NULL);
  +                return apr_pstrcat(cmd->temp_pool, "ProxyPass ", err, NULL);
           }
       }
       return NULL;
  @@ -1249,7 +1249,7 @@
                   if (cmd->path)
                       return "BalancerMember can not have a balancer name when defined in
a location";
                   else
  -                    return "Invalid BalancerMember parameter. Paramet must be in the form
key=value";
  +                    return "Invalid BalancerMember parameter. Paramet must be in the form
'key=value'";
               else
                   *val++ = '\0';
               apr_table_setn(params, word, val);
  @@ -1268,7 +1268,7 @@
       if (!worker) {
           const char *err;
           if ((err = ap_proxy_add_worker(&worker, cmd->pool, conf, name)) != NULL)
  -            return apr_pstrcat(cmd->temp_pool, "BalancerMember: ", err, NULL); 
  +            return apr_pstrcat(cmd->temp_pool, "BalancerMember ", err, NULL); 
       }
       PROXY_COPY_CONF_PARAMS(worker, conf);
       
  @@ -1277,7 +1277,7 @@
       for (i = 0; i < arr->nelts; i++) {
           const char *err = set_worker_param(worker, elts[i].key, elts[i].val);
           if (err)
  -            return apr_pstrcat(cmd->temp_pool, "BalancerMember: ", err, NULL);
  +            return apr_pstrcat(cmd->temp_pool, "BalancerMember ", err, NULL);
       }
       /* Try to find the balancer */
       balancer = ap_proxy_get_balancer(cmd->temp_pool, conf, name); 
  @@ -1286,7 +1286,7 @@
                                                   cmd->pool,
                                                   conf, path);
           if (err)
  -            return apr_pstrcat(cmd->temp_pool, "BalancerMember: ", err, NULL);
  +            return apr_pstrcat(cmd->temp_pool, "BalancerMember ", err, NULL);
       }
       /* Add the worker to the load balancer */
       ap_proxy_add_worker_to_balancer(balancer, worker);
  
  
  
  1.115     +5 -2      httpd-2.0/modules/proxy/mod_proxy.h
  
  Index: mod_proxy.h
  ===================================================================
  RCS file: /home/cvs/httpd-2.0/modules/proxy/mod_proxy.h,v
  retrieving revision 1.114
  retrieving revision 1.115
  diff -u -r1.114 -r1.115
  --- mod_proxy.h	11 Aug 2004 22:41:02 -0000	1.114
  +++ mod_proxy.h	11 Aug 2004 22:48:13 -0000	1.115
  @@ -209,6 +209,7 @@
   #if APR_HAS_THREADS
       apr_reslist_t  *res;    /* Connection resource list */
   #endif
  +    int            nfree;   /* Balancer free count number */
       proxy_conn_rec *conn;   /* Single connection for prefork mpm's */
   };
   
  @@ -250,6 +251,8 @@
       double          lbsatus;    /* Current lbstatus */
       apr_size_t      transfered; /* Number of bytes transfered to remote */
       apr_size_t      readed;     /* Number of bytes readed from remote */
  +    const char      *route;
  +    const char      *redirect;
   } proxy_runtime_worker;
   
   struct proxy_balancer {
  @@ -311,7 +314,7 @@
    *
    */
   APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, pre_request, (proxy_worker **worker,
  -                          struct proxy_balancer **balancer,
  +                          proxy_balancer **balancer,
                             request_rec *r,
                             proxy_server_conf *conf, char **url))                       
  
   /**
  @@ -319,7 +322,7 @@
    * It is called after request for updating runtime balancer status.
    */
   APR_DECLARE_EXTERNAL_HOOK(proxy, PROXY, int, post_request, (proxy_worker *worker,
  -                          struct proxy_balancer *balancer, request_rec *r,
  +                          proxy_balancer *balancer, request_rec *r,
                             proxy_server_conf *conf))
   
   
  
  
  

Mime
View raw message