httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Yann Ylavic <ylavic....@gmail.com>
Subject Re: svn commit: r1758672 - in /httpd/httpd/branches/2.2.x: ./ CHANGES include/httpd.h server/protocol.c
Date Thu, 01 Sep 2016 12:25:05 GMT
On Thu, Sep 1, 2016 at 10:14 AM, Yann Ylavic <ylavic.dev@gmail.com> wrote:
> On Thu, Sep 1, 2016 at 9:57 AM, Yann Ylavic <ylavic.dev@gmail.com> wrote:
>>
>> I'm not sure the readahead is worth it in 2.2.x though, because
>> check_pipeline_flush() does an inconditional flush anyway, and the
>> issue in 2.4.x was that trailing newline(s) might have caused the next
>> request to block in ap_read_request() without flushing the previous
>> one.
>> AFAICT this can't happen in 2.2.x thanks to the FLUSH.
>
> Hmm, my bad, I missed the early return (/* don't flush */) in
> check_pipeline_flush().
> So we may also either backport the check_pipeline() read-ahead part,
> or simply really always FLUSH (avoiding pipelined response).
> WDYT?

Attached is the patch to sync 2.2.x's check_pipeline_flush() with
2.4.x's check_pipeline(), but actually the original 2.2.x code uses
AP_MODE_EATCRLF (which was somehow replaced by a single
AP_MODE_SPECULATIVE earlier in 2.4.x), so it already achieves the same
(modulo the limit on the number of empty lines).

Not sure it's worth the change then, we shouldn't read indefinitely
only [CR]LF in non-blocking mode, and once we get EAGAIN we'd fall
through read_request_line() which should detect (and stop on) more
ones...
Not a big deal IMHO.

Mime
View raw message