]> granicus.if.org Git - apache/commit
mod_ratelimit: Don't interfere with "chunked" encoding.
authorYann Ylavic <ylavic@apache.org>
Tue, 31 Jul 2018 10:35:46 +0000 (10:35 +0000)
committerYann Ylavic <ylavic@apache.org>
Tue, 31 Jul 2018 10:35:46 +0000 (10:35 +0000)
commit352e0faebcdcaf8fc8bb79d30cbd2fe0a34962dd
tree75632487beb3ac93018c30510a170f1f9383ab25
parent53ab92ab7080bd35c7e1428ad4b6bccbc233381e
mod_ratelimit: Don't interfere with "chunked" encoding.

By the time ap_http_header_filter() sends the header brigade and adds the
"CHUNK" filter, we need to garantee that the header went through all the
filters' stack, and more specifically above ap_http_chunk_filter() which
assumes that all it receives is content data.
Since rate_limit_filter() may retain the header brigade, make it run after
ap_http_chunk_filter(), just before AP_FTYPE_CONNECTION filters.

Also, ap_http_header_filter() shouldn't eat the EOS for HEAD/no-body responses.
For instance mod_ratelimit depends on it since r1835168, but any next request
filter may as well to flush and/or bail out approprietely.

This fixes the regression introduced in 2.4.34 (r1835168).
PR 62568.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1837130 13f79535-47bb-0310-9956-ffa450edef68
CHANGES
modules/filters/mod_ratelimit.c
modules/http/chunk_filter.c
modules/http/http_filters.c