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
Date Wed, 11 Aug 2004 23:07:16 GMT
wrowe       2004/08/11 16:07:16

  Modified:    modules/proxy mod_proxy.c
  Log:
  Make sure that if the pre_request was called that the post_request
  gets called too, no mather what the error code is.
  
  Submitted by: mturk
  
  Revision  Changes    Path
  1.127     +9 -6      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.126
  retrieving revision 1.127
  diff -u -r1.126 -r1.127
  --- mod_proxy.c	11 Aug 2004 23:01:39 -0000	1.126
  +++ mod_proxy.c	11 Aug 2004 23:07:16 -0000	1.127
  @@ -97,7 +97,7 @@
       else if (!strcasecmp(key, "retry")) {
           ival = atoi(val);
           if (ival < 1)
  -            return "Retry must be al least one second";
  +            return "Retry must be at least one second";
           worker->retry = apr_time_from_sec(ival);
       }
       else if (!strcasecmp(key, "ttl")) {
  @@ -631,7 +631,7 @@
   
                   /* an error or success */
                   if (access_status != DECLINED && access_status != HTTP_BAD_GATEWAY)
{
  -                    return access_status;
  +                    goto cleanup;
                   }
                   /* we failed to talk to the upstream proxy */
               }
  @@ -653,12 +653,15 @@
                       "If you are using a DSO version of mod_proxy, make sure "
                       "the proxy submodules are included in the configuration "
                       "using LoadModule.", r->uri);
  -        return HTTP_FORBIDDEN;
  +        access_status = HTTP_FORBIDDEN;
  +        goto cleanup;
       }
  +
  +cleanup:
       if (balancer) {
  -        access_status = proxy_run_post_request(worker, balancer, r, conf);
  -        if (access_status == DECLINED) {
  -            access_status = OK; /* no post_request handler available */
  +        int post_status = proxy_run_post_request(worker, balancer, r, conf);
  +        if (post_status == DECLINED) {
  +            post_status = OK; /* no post_request handler available */
               /* TODO: reclycle direct worker */
           }
       }
  
  
  

Mime
View raw message