diff options
author | Cliff Woolley <jwoolley@apache.org> | 2002-07-03 01:51:21 +0200 |
---|---|---|
committer | Cliff Woolley <jwoolley@apache.org> | 2002-07-03 01:51:21 +0200 |
commit | 73222b72555dadef22190666feb4659b83204bc3 (patch) | |
tree | ffbc7e1af1be5396a54e4482ad58f40028f66d41 /server | |
parent | Remove unused variable 'str'. (diff) | |
download | apache2-73222b72555dadef22190666feb4659b83204bc3.tar.xz apache2-73222b72555dadef22190666feb4659b83204bc3.zip |
Fix C-L filter non-blocking-mode brokenness. It was failing to ever
read from pipe/socket buckets again if it got APR_EAGAIN from them
due to its use of APR_BRIGADE_FOREACH.
Submitted by: the gang on IRC
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@95946 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'server')
-rw-r--r-- | server/protocol.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/server/protocol.c b/server/protocol.c index 59119846e3..3f2dcb6358 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -1199,12 +1199,14 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_content_length_filter(ap_filter_t *f, 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 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_content_length_filter(ap_filter_t *f, flush = 1; break; } + continue; } else if (rv != APR_EOF) { ap_log_rerror(APLOG_MARK, APLOG_ERR, rv, r, @@ -1255,6 +1258,7 @@ AP_CORE_DECLARE_NONSTD(apr_status_t) ap_content_length_filter(ap_filter_t *f, ctx->curr_len += len; r->bytes_sent += len; + e = APR_BUCKET_NEXT(e); } if (split) { |