httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geoff Millikan" <>
Subject [users@httpd] mod_disk_cache causing corrupted output on server side includes?
Date Thu, 03 Jun 2010 21:24:47 GMT
Dear List,

It appears that when mod_disk_cache reads server side includes to create its final cached
web page, it sometimes corrupts the included file.

I think the issue may be that the included file is getting DEFLATEd and Apache is intermittently
forgetting to ungzip it prior to putting it into the parent page.

Any other thoughts?


Details: The parent web page is called "index.shtml" and the child file is getting included
like this:
<!--#include virtual="/dir/include/my_html_file.html" -->

Everything else on the page looks fine but where the my_html_file.html should be we see binary
output in the source code like this:
í\énÛHþÜ|á]åâu?-SìA½¡!ŸÄoÿ›IÅÇsØß'±"’ÿ ¼ñ*dLXúIpV.n§Œ

If I restart Apache, the problem remains. But the problem goes away if I delete the cache
on the web server. So the cache must have gotten corrupted. I can refresh the page many times
after that and the page is fine. This good page is kept in cache for about 30 days because
of the config settings (below).

LoadModule deflate_module modules/
DeflateCompressionLevel 1
DeflateMemLevel 9
DeflateWindowSize 15
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png|ico)$ no-gzip dont-vary
#Header append Vary User-Agent env=!dont-vary

LoadModule disk_cache_module modules/
CacheRoot /var/httpd/proxy/
CacheEnable disk /
CacheDisable /i
CacheMaxFileSize 500000
CacheMinFileSize 1000
CacheDirLevels 2
CacheDirLength 2
CacheIgnoreCacheControl Off
CacheIgnoreNoLastMod On
CacheIgnoreHeaders Set-Cookie
CacheLastModifiedFactor 0.1
CacheMaxExpire 172800
CacheDefaultExpire 86400

View raw message