Subject: | WWW::Mechanize does not decompress content. |
Date: | Fri, 25 May 2007 18:41:06 +0300 |
To: | bug-www-mechanize [...] rt.cpan.org |
From: | "Peteris Krumins [Newsgroups]" <pknewsgroups [...] gmail.com> |
Hello.
I was downloading an image which was gzip compressed by the server but
the WWW::Mech did not decompress it.
Usually it does but not from this particular site.
Here is an example program which will get the image from that particular
site and write the content to 'picture.jpg'.
I checked it with Ethereal and what gets written to the file is the
gzipped content and not the uncompressed jpg picture.
I am using the latest version of WWW::Mechanize 1.26
#!/usr/bin/perl
use WWW::Mechanize;
$mech = new WWW::Mechanize;
$mech->get('http://www.livevideo.com/iv.ashx?c=0EE8DC32A0A5454A824427376239BE6619',
':content_file' => 'picture.jpg');
P.Krumins