]> granicus.if.org Git - apache/commitdiff
prevent crash when connection closed before complete request received
authorAllan K. Edwards <ake@apache.org>
Thu, 21 Dec 2000 01:44:28 +0000 (01:44 +0000)
committerAllan K. Edwards <ake@apache.org>
Thu, 21 Dec 2000 01:44:28 +0000 (01:44 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87478 13f79535-47bb-0310-9956-ffa450edef68

modules/http/http_protocol.c

index 079677d595b50ff9a305d7146aaca763b7a10a9d..594559b1338a3157d4a2b95f3946c83942ff5cc9 100644 (file)
@@ -969,6 +969,10 @@ apr_status_t ap_http_filter(ap_filter_t *f, ap_bucket_brigade *b, ap_input_mode_
         const char *str;
         apr_size_t length;
 
+        if (AP_BRIGADE_EMPTY(ctx->b)) {
+            return APR_EOF;
+        }
+
         e = AP_BRIGADE_FIRST(ctx->b);
         while (e->length == 0) {
             AP_BUCKET_REMOVE(e);