[...]
> But does not work if it's PHP - in this case, the content is compressed
> with "gzip":
>
> $ curl -v -H "Accept-Encoding: gzip, deflate, br"
> https://server.tld/pp.php 2>&1 | grep content-encoding
> < content-encoding: gzip
>
> Curiously, it does work with PHP if I specify "br" as the only value in
> "Accept-Encoding" (browsers however use "gzip, deflate, br"):

Sounds like you need to enforce the correct order of the filters. I don't know
how to do that using "AddOutputFilterByType", but with "FilterProvider",
the example below should work. While you're there, you can also enable
mod_buffer to improve the compression ratio:

BufferSize 131072
FilterProvider buffer           BUFFER   "resp('Transfer-Encoding') ==
'' && %{CONTENT_TYPE} =~ m|^text/|"
FilterProvider gzip_compression DEFLATE  "resp('Transfer-Encoding') ==
'' && %{CONTENT_TYPE} =~ m|^text/|"
FilterProvider brotli_compression BROTLI_COMPRESS
"resp('Transfer-Encoding') == '' && %{CONTENT_TYPE} =~ m|^text/|"

FilterChain buffer brotli_compression gzip_compression


rainer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to