Commit 0169b6bb authored by Jeff Trawick's avatar Jeff Trawick
Browse files

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
parent e76c818b
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -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,