WWW::Mechanize::GZip(3pm)

WWW::Mechanize::GZip3pm

Tries to fetch webpages with gzip-compression

Usage

    use WWW::Mechanize::GZip;
    my $mech = WWW::Mechanize::GZip->new();
    my $response = $mech->get( $url );
    print "x-content-length (before unzip) = ", $response->header('x-content-length');
    print "content-length (after unzip) = ", $response->header('content-length');

Version

Version 0.14

Overview

The WWW::Mechanize::GZip module tries to fetch a URL by requesting gzip-compression from the webserver.

If the response contains a header with 'Content-Encoding: gzip', it decompresses the response in order to get the original (uncompressed) content.

This module will help to reduce bandwidth fetching webpages, if supported by the webeserver. If the webserver does not support gzip-compression, no decompression will be made.

This modules is a direct subclass of WWW::Mechanize and will therefore support any methods provided by WWW::Mechanize.

The decompression is handled by Compress::Zlib::memGunzip.

Methods

prepare_request

Adds 'Accept-Encoding' => 'gzip' to outgoing HTTP-headers before sending.

send_request

Unzips response-body if 'content-encoding' is 'gzip' and corrects 'content-length' to unzipped content-length.

Releases

8 releases since Debian 6.0 (Squeeze); the text changed 2 times.

  1. 6.0–9
  2. 10–11
  3. 12–13

Author

Peter Giessner "[email protected]"

From libwww-mechanize-gzip-perl 0.14-2 in Debian 13 (Trixie). Parsed by carta from the page's man source.