summaryrefslogtreecommitdiffstats
path: root/modules/http/http_protocol.c
diff options
context:
space:
mode:
authorAllan K. Edwards <ake@apache.org>2000-12-21 02:44:28 +0100
committerAllan K. Edwards <ake@apache.org>2000-12-21 02:44:28 +0100
commite3cf0931a306451ea4e5232647d2e6e5b826181d (patch)
tree7c4fb1fd3bb7fcdecd452c0b03323985aa17e8d5 /modules/http/http_protocol.c
parent Back out the target path change from serverroot\bin back to serverroot (diff)
downloadapache2-e3cf0931a306451ea4e5232647d2e6e5b826181d.tar.xz
apache2-e3cf0931a306451ea4e5232647d2e6e5b826181d.zip
prevent crash when connection closed before complete request received
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@87478 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to '')
-rw-r--r--modules/http/http_protocol.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/http/http_protocol.c b/modules/http/http_protocol.c
index 079677d595..594559b133 100644
--- a/modules/http/http_protocol.c
+++ b/modules/http/http_protocol.c
@@ -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);