E
E
Eugene Ordinary2016-09-04 20:38:05
Apache HTTP Server
Eugene Ordinary, 2016-09-04 20:38:05

In Apache mod_deflate removes ETag and Content-Length. How to fix?

Apache server has mod_deflate enabled.
1. When an html page is sent using php and an ETag header is sent -- the server sends a compressed gzip file, but without the ETag. In this case, the Content-Length is correct and Vary: Accept-Encoding is added.
2. When a fly-generated application type file is sent using php and the Content-Length header is sent, the server returns a gzip-compressed file, but without the Content-Length. This adds Transfer-Encoding: chunked and Vary: Accept-Encoding. This is despite the fact that static files are given with the correct Content-Length.
3. When php sends an application type file formed on the fly in parts (in response to a request with Range) and sends the 206 Partial content header, as well as Content-Range and Content-Length, the server does not compress anything at all. This is despite the fact that the requested parts of the static content are sent compressed, with the correct Content-Range and Content-Length.
Without mod_deflate everything works correctly.
The last problem is not critical, it is unlikely that they will often request content in parts. But the first two problems are serious. Is it possible to either solve them or will it be necessary to disable mod_deflate for these content types?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question