On Tue, May 19, 2009 at 10:52:53AM +0200, fabrice régnier wrote:
>
> My web server send gzip pages.
>
> Wget can download this gzip pages with this command:
>
> # wget -S --header='Accept-Encoding: gzip,deflate' http://my_url
>
> But it stays gzip compressed. When i open these pages with firefox, i'd 
> like to see them in a more clear format ;)
>
This is interesting problem. I have web server behing slow link, thus I have
all bigger files compressed (on file system) and I send them to clients
compressed with propper Content-Encoding header.

> My questions are:
> * should wget uncompress gzip on the fly while downloading ?
I think it would be convenient for the user. (This feature should be driven on
Content-Encoding header only, not on Content-Type.)

> * should firefox should uncompress gzip while opening a local gzip file ?
Problem is, Firefox doesn't investigate the content of the file and it's
MIME type guess is based on file extension only. Firefox also doesn't
consider content encoding at all on local files. (It's pain to browse localy
saved web pages with compressed SVG images by Firefox.)

> * should i manually uncompress all gzip files before i can open them with 
> firefox ?
That's equivalent to first question: Is Content-Encoding just a transport
encoding (like base64 of quoted-printable in e-mail) or is it a permanent
mark `This file is compressed'?

Additionally, I have another approach: The MIME type and Content-Encoding can
be saved into extended file attributes and then any application can reuse this
info to figure out the type of data easily without file name extionsion or
file content magic. (This feature has been discussed on this list already and
my patch has been dismissed.)

-- Petr

Attachment: pgpO5TedS7Ci4.pgp
Description: PGP signature

Reply via email to