in reply to Re:^4 LWP not returning leading spaces in web page (ver 2)
in thread LWP not returning leading spaces in web page (ver 2)
You want the gzip related methods of Compress::Zlib rather than inflate. The most direct method would be:
use LWP; use Compress::Zlib; my $ua = new LWP::UserAgent; my $request = HTTP::Request->new('GET', 'http://groups.yahoo.com/'); $request->headers->header( accept_encoding => 'x-gzip, gzip, identity', user_agent => 'Mozilla/5.0 (compatible; Konqueror/3; Linux)', ); my $r = $ua->request($request); my $gzipped_content = $r->content; print Compress::Zlib::memGunzip($gzipped_content);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: ^6 LWP not returning leading spaces in web page (ver 2)
by aspen (Sexton) on Feb 03, 2003 at 00:41 UTC |