httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ruediger Pluem <rpl...@apache.org>
Subject Re: svn commit: r1482522 - in /httpd/httpd/trunk: ./ docs/log-message-tags/ include/ modules/dav/main/ modules/generators/ modules/http/ modules/proxy/ server/
Date Fri, 17 May 2013 09:26:56 GMT


Graham Leggett wrote:
> On 15 May 2013, at 9:23 PM, Ruediger Pluem <rpluem@apache.org> wrote:
> 
>> Now we have:
>>
>> t/apache/pr17629.t         (Wstat: 0 Tests: 4 Failed: 1)
>>  Failed test:  4
> 
> Looking at a verbose version of this test, we see this:
> 
> # expected: begin-foobar-end
> # received: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> # <html><head>
> # <title>400 Bad Request</title>
> # </head><body>
> # <h1>Bad Request</h1>
> # <p>Your browser sent a request that this server could not understand.<br />
> # </p>
> # </body></html>
> not ok 4
> 
> Tracing through the code, we get a bad request because we trip over this code in mod_deflate:
> 
>             /* If we actually see the EOS, that means we screwed up! */
>             if (APR_BUCKET_IS_EOS(bkt)) {
>                 inflateEnd(&ctx->stream);
>                 ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01390)
>                               "Encountered EOS bucket in inflate filter (bug?)");
>                 return APR_EGENERAL;
>             }
> 
> Why does seeing an EOS in the input stream mean we screwed up? I don't follow.

We should not see an EOS bucket before

inflate(&ctx->stream, Z_NO_FLUSH); in line 1061 returned Z_STREAM_END. This would mean
we received an incomplete
compressed stream.
And if we see Z_STREAM_END we leave the for loop and stop processing buckets. Hence we cannot
hit a possible EOS bucket
in the brigade any longer.
So the test possibly sents an incomplete compressed body.


Regards

RĂ¼diger


Mime
View raw message