Re: `boa' vs `apache', running from x?inetd.conf, mime-types, mailcap
Am 29.06.97 schrieb karlheg+debian # inetarena.com ...
KMH> The browser's ability to view compressed html is dependant on correct
KMH> entries in "/etc/mailcap". They all use that to find the program they
KMH> need to run to handle a particular MIME type.
I've tested lynx and netscape. lynx can umcompress on the fly .html.gz
files. netscape is able to uncompress .html.gz files if you open it as
file. If you get the .html.gz from a WWW server with right settings
(content-type text/html and transfer encoding x-gzip) netscape will not
show the file!
KMH> Module action_module mod_actions.o
KMH> ... so it looks like it won't be too difficult to set up a perl script
KMH> that can turn .html.gz files into .html output to the browser as
KMH> text/html. So it won't have to send application/x-gzip. I don't
KMH> think that's the best solution, since sending gzipped data will save
But the most WWW browsers will have problems. I would suggest using the
mod_rewrite Module. We could use something like this:
RewriteRule ^(.+\.html\.gz)/$ /cgi-bin/gzfly?$1 [R]
(see German iX Journal 12/96)
This tells the browser to request /cgi-bin/gzfly?foo.html.gz
gzfly would look like this:
echo "Content-type: text/html
gzip -d -c /usr/doc/$1
Uni: Budde@tu-harburg.d400.de Fido: 2:240/5202.15
Mailbox: email@example.com http://www.tu-harburg.de/~semb2204/
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
Trouble? e-mail to firstname.lastname@example.org .