From: Jeff Trawick Date: Thu, 6 Jan 2005 14:16:54 +0000 (+0000) Subject: if last brigade of data received from client had data X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=15da839a22e83eaf47630918087d7732d021e4f5;p=thirdparty%2Fapache%2Fhttpd.git if last brigade of data received from client had data and EOS, then input_brigade would be empty here git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/proxy-reqbody@124377 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/proxy/proxy_http.c b/modules/proxy/proxy_http.c index ef53a84f195..4bfb93fa497 100644 --- a/modules/proxy/proxy_http.c +++ b/modules/proxy/proxy_http.c @@ -392,10 +392,12 @@ static apr_status_t stream_reqbody_chunked(apr_pool_t *p, b = header_brigade; } else { - /* input brigade still has an EOS which we can't pass to the output_filters. */ - e = APR_BRIGADE_LAST(input_brigade); - AP_DEBUG_ASSERT(APR_BUCKET_IS_EOS(e)); - apr_bucket_delete(e); + if (!APR_BRIGADE_EMPTY(input_brigade)) { + /* input brigade still has an EOS which we can't pass to the output_filters. */ + e = APR_BRIGADE_LAST(input_brigade); + AP_DEBUG_ASSERT(APR_BUCKET_IS_EOS(e)); + apr_bucket_delete(e); + } e = apr_bucket_immortal_create(ASCII_ZERO ASCII_CRLF /* */ ASCII_CRLF,