Hello Giuseppe,
(for the Germans: Giuseppe spoken Tschuseppe ?)
actually wget doesn't handle gzip compressed files, adding the
Accept-Encoding header is just a hack, pretending wget supports gzip
when it doesn't.
In order to use -p you need to download the file as plain text, not
forcing a compression.
Ok, that I was afraid. Maybe that should be mentioned shortly in the man
page under the "--page-requisites" documentation.
Thanks
Jens
P.S.: OT: I "misused" wget for some kind of (relative) benchmarking to
check the performance of some different configurations of an
self-administrated Apache/Varnish system. Anyone knows a "simple" (batch)
tool to "simulate" real browser behaviour for that purposes? My current
test approach using Firefox with Firebug/PageSpeed and/or Wireshark
is probably realistic but a little bit troublesome.
Jens Schleusener <[email protected]> writes:
Hi,
sorry, the below described wget behaviour may not be a real bug:
I use often the wget option
--page-requisites
("-p") but for some test purposes I now added also the option
--header='Accept-Encoding: gzip, deflate'
Now wget downloads and saves for e,g, a file named index.html (not
index.html.gz) but in "gzip compressed" format. But wget doesn't seem
to detect that and so cannot find other files that are necessary to
properly display the given HTML page. Any hints to circumvent that
behaviour respectively to force decompression of compressed files
after download?
Regards
Jens
--
Dr. Jens Schleusener T-Systems Solutions for Research GmbH
Tel: +49 551 709-2493 Bunsenstr.10
Fax: +49 551 709-2169 D-37073 Goettingen
[email protected] http://www.t-systems.com/