1

I came across a problem with deflating HTML files larger than 8000 characters (documented in this question at stackoverflow). A straight HTML file larger than that causes the server to fail to deliver the contents resulting in the browser giving a 'server reset connection' message or something similar.

If I disable compression for the directory in question by removing the line containing 'SetOutputFilter DEFLATE' then the size limit is removed, but of course pages are not then compressed. This Apache document states that the default deflate buffer size is 8KB, which corresponds roughly to the size limit I am reaching, but adding the line 'DeflateBufferSize 20480' makes no difference to the size of page that can be compressed so I guess that is not the parameter I need to add or change.

Output generated by server side includes or AJAX calls is often far larger than 8000 characters and is compressed without problems. It is only with a straight HTML file that I am experiencing issues.

How can I increase the size of file that module deflate will compress?

EDIT:I did not find an answer beyond disabling mod_deflate, instead I put the HTML into another file and used a Server Side Include to display it. Not ideal, but it gets the job done and the page isn't part of the main project.

blankabout
  • 1,004
  • 1
  • 9
  • 16

1 Answers1

0

According to the "module documentation":http://httpd.apache.org/docs/2.2/mod/mod_deflate.html the DeflateBufferSize directive doesn't control the size of files which may be deflated, but instead the size of the fragments being deflated. The larger files (i.e. the AJAX calls you cite) are getting fragmented and compressed in fragments.

I'm guessing the error is due to something other than mod_deflate.

pjmorse
  • 1,450
  • 1
  • 17
  • 34
  • I agree about DeflateBufferSize but it was the only parameter that seemed even vaguely connected with the issue we are experiencing. Anyway, I have a workaround (using SSI) so it's not a critical issue anymore, I'd still be interested in seeing any possible causes. – blankabout Mar 08 '12 at 10:13
  • I could well be something other than mod_deflate, but taking out that line from the directory config allowed the page to be displayed so that led me to believe it was the problem. – blankabout Mar 08 '12 at 10:26