2

I updated apache from version 2.2 to 2.4 some time ago and now all responses are not compressed anymore by mod_deflate. The limit seems to be 68 bytes. I tried to find some setting for this but could not find anything - is it even configurable?

Example:

echo "hellooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" > /var/www/html/index.html

Response is not gzipped:

Content-Length: 68

After adding one more character:

echo "helloooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo" > /var/www/html/index.html

The response headers are ok and the content is compressed

Content-Encoding: gzip
Content-Length: 28

Any help is appreciated!

cyberseppo
  • 75
  • 1
  • 9
drodil
  • 2,292
  • 1
  • 22
  • 37

1 Answers1

0

You can force gzip output in PHP by using

ob_start( "ob_gzhandler" );

php.net ob_gzhandler

cyberseppo
  • 75
  • 1
  • 9