mod_deflate issue with Content negotiation, Server-Side Includes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
   "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux