httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark <>
Subject [users@httpd] mod_deflate issue with Content negotiation, Server-Side Includes
Date Tue, 05 Oct 2010 20:34:58 GMT
I'm experiencing a problem when mod_deflate is used in conjunction
with both content negotiation and server-side includes. Specifically,
it appears that the document content is deflated before all the content
has been retrieved and assembled. The end result is that a lot of
"garbage" characters appear in the web browser instead of the properly
assembled page.

It's worth noting that this problem only appears when the included
content is resolved via content negotiation. If I include a non-negotiated
file, it works correctly. So this isn't a problem with SSI alone.

I suppose the best way to illustrate the problem is with an example.
Suppose I have exactly three files in my web folder: .htaccess, 
index.shtml.en, and menu.shtml.en.

The contents of the .htaccess file is:
AddLanguage en .en
Options MultiViews Includes

The contents of index.shtml.en is:
English Page
<!--#include virtual="menu.shtml" -->

The contents of menu.shtml.en is:
English menu

Supposing these files are served on my localhost, and supposing my
DirectoryIndex includes index.shtml, I get a very strange result when
accessing http://localhost/. The text "English menu" appears followed
by several "garbage" characters (in reality, these characters are the
deflated contents of the index.shtml.en file).

Strangely, if I access the URL like so: http://localhost/index.shtml, it
works fine. If I access it via http://localhost/index.shtml.en, the garbage
characters appear again.

Disabling mod_deflate solves the issue and everything works as
expected, but then the pages are not sent compressed.

Any help in this matter would be very much appreciated. Is this a
server configuration issue, or an issue with mod_deflate or SSI?

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message