Adam, Could you try this out and report the results? I'm guessing that an EOS bucket was being encountered and removed from the brigade, leaving an empty brigade. APR_BRIGADE_FIRST then returned a bogus bucket and we segfaulted when trying to read from that bogus bucket.
I think this code is more correct than the code it replaces. Only guessing that it will prevent the segfault though. Bill ----- Original Message ----- From: <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Wednesday, January 02, 2002 2:12 PM Subject: cvs commit: httpd-2.0/modules/proxy proxy_util.c > stoddard 02/01/02 11:12:40 > > Modified: modules/proxy proxy_util.c > Log: > Change the return code from APR_TIMEUP to APR_ECONNABORTED, which seems > to be a bit more descriptive. Move the check to inside the inner while() > loop and add an additional check for eos. If we get an EOS bucket, there > is no point in going further. Hopefully this will fix the last seg fault > in the function. > > Revision Changes Path > 1.76 +4 -5 httpd-2.0/modules/proxy/proxy_util.c > > Index: proxy_util.c > =================================================================== > RCS file: /home/cvs/httpd-2.0/modules/proxy/proxy_util.c,v > retrieving revision 1.75 > retrieving revision 1.76 > diff -u -r1.75 -r1.76 > --- proxy_util.c 31 Dec 2001 20:43:59 -0000 1.75 > +++ proxy_util.c 2 Jan 2002 19:12:40 -0000 1.76 > @@ -1020,13 +1020,12 @@ > &zero /* readline */))) { > return rv; > } > - if (APR_BRIGADE_EMPTY(bb)) { > - /* The connection aborted or timed out */ > - return APR_TIMEUP; > - } > - > /* loop through each bucket */ > while (!found) { > + if (*eos || APR_BRIGADE_EMPTY(bb)) { > + /* The connection aborted or timed out */ > + return APR_ECONNABORTED; > + } > e = APR_BRIGADE_FIRST(bb); > if (APR_BUCKET_IS_EOS(e)) { > *eos = 1; > > > >