Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 66855 invoked from network); 11 Aug 2004 23:07:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 11 Aug 2004 23:07:19 -0000 Received: (qmail 1109 invoked by uid 500); 11 Aug 2004 23:07:17 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 1065 invoked by uid 500); 11 Aug 2004 23:07:17 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 1049 invoked by uid 500); 11 Aug 2004 23:07:17 -0000 Delivered-To: apmail-httpd-2.0-cvs@apache.org Received: (qmail 1038 invoked by uid 99); 11 Aug 2004 23:07:17 -0000 X-ASF-Spam-Status: No, hits=-2.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.27.1) with SMTP; Wed, 11 Aug 2004 16:07:17 -0700 Received: (qmail 66837 invoked by uid 1134); 11 Aug 2004 23:07:16 -0000 Date: 11 Aug 2004 23:07:16 -0000 Message-ID: <20040811230716.66836.qmail@minotaur.apache.org> From: wrowe@apache.org To: httpd-2.0-cvs@apache.org Subject: cvs commit: httpd-2.0/modules/proxy mod_proxy.c X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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 */ } }