Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 92027 invoked from network); 29 Sep 2005 16:42:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 29 Sep 2005 16:42:28 -0000 Received: (qmail 64630 invoked by uid 500); 29 Sep 2005 16:42:23 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 64577 invoked by uid 500); 29 Sep 2005 16:42:23 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 64564 invoked by uid 99); 29 Sep 2005 16:42:23 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Sep 2005 09:42:23 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [209.133.199.10] (HELO jimsys.jagunet.com) (209.133.199.10) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 29 Sep 2005 09:42:29 -0700 Received: from [127.0.0.1] (localhost [127.0.0.1]) by jimsys.jagunet.com (Postfix) with ESMTP id CAB7970E32A for ; Thu, 29 Sep 2005 12:42:01 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v734) In-Reply-To: <433C0FD6.2040708@gmx.de> References: <433AA87F.9040503@web.turner.com> <433B9660.7090908@apache.org> <433BEEC5.5090000@turner.com> <999C03EA-16A6-43D2-89CD-A0A6652A9B8B@jaguNET.com> <433C0FD6.2040708@gmx.de> Content-Type: text/plain; charset=ISO-8859-1; delsp=yes; format=flowed Message-Id: <0288D21D-3992-449E-8969-21D4E51A2818@jaguNET.com> Content-Transfer-Encoding: quoted-printable From: Jim Jagielski Subject: Re: [PATCH] mod_proxy run cleanup on balancer failure Date: Thu, 29 Sep 2005 12:42:01 -0400 To: dev@httpd.apache.org X-Mailer: Apple Mail (2.734) X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Except for the formatting +1 :) On Sep 29, 2005, at 12:01 PM, r.pluem@t-online.de wrote: > > What about the following patch? I think it should address all the =20 > things > discussed. > > Regards > > R=FCdiger > > Index: mod_proxy.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- mod_proxy.c (Revision 280422) > +++ mod_proxy.c (Arbeitskopie) > @@ -679,8 +679,20 @@ > char *url =3D uri; > /* Try to obtain the most suitable worker */ > access_status =3D ap_proxy_pre_request(&worker, &balancer, =20= > r, conf, &url); > - if (access_status !=3D OK) > - return access_status; > + if (access_status !=3D OK) { > + /* > + * Only return if access_status is not =20 > HTTP_SERVICE_UNAVAILABLE > + * This gives other modules the chance to hook into the > + * request_status hook and decide what to do in this =20 > situation. > + */ > + if (access_status !=3D HTTP_SERVICE_UNAVAILABLE) return =20= > access_status; > + /* > + * Ensure that balancer is NULL if worker is NULL to =20 > prevent > + * potential problems in the post_request hook. > + */ > + if (!worker) balancer =3D NULL; > + goto cleanup; > + } > if (balancer && balancer->max_attempts_set && !max_attempts) > max_attempts =3D balancer->max_attempts; > /* firstly, try a proxy, unless a NoProxy directive is =20 > active */ > >