]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
if last brigade of data received from client had data
authorJeff Trawick <trawick@apache.org>
Thu, 6 Jan 2005 14:16:54 +0000 (14:16 +0000)
committerJeff Trawick <trawick@apache.org>
Thu, 6 Jan 2005 14:16:54 +0000 (14:16 +0000)
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

modules/proxy/proxy_http.c

index ef53a84f195a063fc05630723d241c3b3193d10a..4bfb93fa4978c4f73acd7a8f0c1b7792add52ecb 100644 (file)
@@ -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
                                        /* <trailers> */
                                        ASCII_CRLF,