summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Trawick <trawick@apache.org>2005-01-05 15:25:12 +0000
committerJeff Trawick <trawick@apache.org>2005-01-05 15:25:12 +0000
commit7fa15d74f14c5ab7218c556c40fef1bd72514332 (patch)
tree8e7d535790d5dbaf3859655b2e4e090d830a1081
parent168ee6cbfb7ea414e1d90baf36c3bc7ecc70902f (diff)
downloadhttpd-7fa15d74f14c5ab7218c556c40fef1bd72514332.tar.gz
the check for EOS isn't going to work if we already
deleted the eos; we ended up sending the last piece of data from the client twice; I had (poorly) modified the EOS section from the normal idiom to keep from having to deal with the EOS later when reusing the input brigade git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/proxy-reqbody@124220 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--modules/proxy/proxy_http.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/modules/proxy/proxy_http.c b/modules/proxy/proxy_http.c
index e11336dae6..c0038557cd 100644
--- a/modules/proxy/proxy_http.c
+++ b/modules/proxy/proxy_http.c
@@ -335,16 +335,16 @@ static apr_status_t stream_reqbody_chunked(apr_pool_t *p,
if (APR_BUCKET_IS_EOS(APR_BRIGADE_LAST(input_brigade))) {
seen_eos = 1;
- /* We can't pass this EOS to the output_filters. */
- e = APR_BRIGADE_LAST(input_brigade);
- apr_bucket_delete(e);
-
/* As a shortcut, if this brigade is simply an EOS bucket,
* don't send anything down the filter chain.
*/
if (APR_BUCKET_IS_EOS(APR_BRIGADE_FIRST(input_brigade))) {
break;
}
+
+ /* We can't pass this EOS to the output_filters. */
+ e = APR_BRIGADE_LAST(input_brigade);
+ apr_bucket_delete(e);
}
apr_brigade_length(input_brigade, 1, &bytes);
@@ -392,6 +392,10 @@ 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);
e = apr_bucket_immortal_create(ASCII_ZERO ASCII_CRLF
/* <trailers> */
ASCII_CRLF,