From: Justin Erenkrantz Date: Sun, 3 Feb 2002 17:43:35 +0000 (+0000) Subject: Oh, no. It's legal to have 0 bytes read. Just not -1. If *that* happens, X-Git-Tag: 2.0.32~120 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1ed7a6d590a695709755d9b23bf1843d562fdbff;p=apache Oh, no. It's legal to have 0 bytes read. Just not -1. If *that* happens, I want to see a core. 0 bytes reads are fine. Grr. (I'm so tempted to throw this assert out, but if we get -1 length brigades back, we're gonna be screwed.) git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93202 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c index e9a2b82d04..bf28682630 100644 --- a/modules/http/http_protocol.c +++ b/modules/http/http_protocol.c @@ -661,7 +661,7 @@ apr_status_t ap_http_filter(ap_filter_t *f, apr_bucket_brigade *b, /* If this happens, we have a bucket of unknown length. Die because * it means our assumptions have changed. */ - AP_DEBUG_ASSERT(totalread > 0); + AP_DEBUG_ASSERT(totalread >= 0); if (ctx->state != BODY_NONE) { ctx->remaining -= totalread;