Bill,
Everything looks good except that ap_proxy_string_read() now segfaults on
its apr_bucket_read(). It appears that APR_BRIGADE_EMPTY is not sufficient
to detect the case of the closed socket with no data. I suspect that this
is because the core filter seeds the brigade with a socket bucket and that
this is what is giving apr_bucket_read problems.
This bit of code seems to do the trick, but again I am still a little unsure
of my footing with filters and buckets.
-adam
Index: proxy_util.c
===================================================================
RCS file: /home/cvspublic/httpd-2.0/modules/proxy/proxy_util.c,v
retrieving revision 1.75
diff -u -r1.75 proxy_util.c
--- proxy_util.c 31 Dec 2001 20:43:59 -0000 1.75
+++ proxy_util.c 2 Jan 2002 01:29:58 -0000
@@ -1031,7 +1031,13 @@
if (APR_BUCKET_IS_EOS(e)) {
*eos = 1;
}
+ else if (e->length == 0) {
+ APR_BUCKET_REMOVE(e);
+ apr_bucket_destroy(e);
+ break;
+ }
else {
+
if (APR_SUCCESS != apr_bucket_read(e, (const char **)&response, &len,
APR_BLOCK_READ)) {
return rv;
}