httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Cliff Woolley <jwool...@virginia.edu>
Subject Re: viewcvs shorting out?
Date Tue, 02 Jul 2002 23:42:45 GMT
On Tue, 2 Jul 2002, Justin Erenkrantz wrote:

> Fix forthcoming (we're discussing alternatives on IRC now).  -- justin

The results of said conversation:

Index: protocol.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/protocol.c,v
retrieving revision 1.107
diff -u -d -r1.107 protocol.c
--- protocol.c  26 Jun 2002 19:45:07 -0000      1.107
+++ protocol.c  2 Jul 2002 23:44:54 -0000
@@ -1199,12 +1199,14 @@
         split = NULL;
         flush = 0;

-        APR_BRIGADE_FOREACH(e, b) {
+        e = APR_BRIGADE_FIRST(b);
+        while (e != APR_BRIGADE_SENTINEL(b)) {
             const char *ignored;
             apr_size_t len;
             len = 0;
             if (APR_BUCKET_IS_EOS(e)) {
                 eos = 1;
+                break;
             }
             else if (APR_BUCKET_IS_FLUSH(e)) {
                 if (partial_send_okay) {
@@ -1241,6 +1243,7 @@
                         flush = 1;
                         break;
                     }
+                    continue;
                 }
                 else if (rv != APR_EOF) {
                     ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r,
@@ -1255,6 +1258,7 @@

             ctx->curr_len += len;
             r->bytes_sent += len;
+            e = APR_BUCKET_NEXT(e);
         }

         if (split) {


The key part to notice here is that when we get APR_EAGAIN from
apr_bucket_read(), we were failing to ever read from that bucket again
because of the APR_BRIGADE_FOREACH.

--Cliff


Mime
View raw message