Z
Z
Zohei2014-03-29 13:09:40
PHP
Zohei, 2014-03-29 13:09:40

Why doesn't it return content-length for gzip?

Good afternoon.
htaccess settings

<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html application/json text/plain text/css application/javascript
    php_flag zlib.output_compression 1
    FileETag none
</IfModule>

With small amounts of json, the content-length header is returned correctly.
However, when the size of the output reaches several megabytes, there is no content-length.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Z
Zohei, 2014-04-02
@Zohei

In order to always give content-lenght, in the Apache config you need to increase the buffer size for mod_deflate

<IfModule mod_deflate.c>
    DeflateBufferSize тут-значение-побольше
</IfModule>

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question