How to configure Apache 2 to compress xml files on serving?

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

 



I need to set up a test environment where I am running Apache locally
with a number of xml data files as objects to serve.
I am doing this to simulate a live server tha I don't want to disturb
for my testing. The live server responds to requests for file URL:s
like: http://server/dir/file.xml.gz by sending a gzipped data stream
that FireFox discovers is compressed and expands it into the browse
window so that the file.xml contents is shown.

I am developing an application to retrieve the data from this site and
I am using Borland Delphi with the Indy components (TIdHTTP) and also
in this case the indy HTTP component sees that the file is compressed
and expands it into my program so I can handle the data itself.

I want to achieve the same thing with my test environment but it does
not work neither in FireFox nor in my application. Expansion does not
happen. My test files are a selection of the gz files I have
downloaded from the original site, so they are valid as far as I can
understand.

It seems like there is a setting in the Apache server to change so
that the server along with the actual file data also sends "something"
that triggers the expansion. What this could be I don't know, and
therefore I am asking here.

So what is it one should configure to get it going?
Here is the config section for my test dir in the Apache conf file:

Alias /xmltv/ "C:/Engineering/Projects/XMLTV/Testsite/"

<Directory "C:/Engineering/Projects/XMLTV/Testsite">
    Options Indexes MultiViews Includes
    AllowOverride None
    Order allow,deny
    Allow from all
    AddType text/html .shtml
    AddType application/x-httpd-php .php
    AddOutputFilter INCLUDES .shtml 
</Directory>

What should I do to make Apache tell browsers that the file it sends
is compressed?

Bo Berglund


---------------------------------------------------------------------
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