GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
WWW::Mechanize::GZip(3) User Contributed Perl Documentation WWW::Mechanize::GZip(3)

WWW::Mechanize::GZip - tries to fetch webpages with gzip-compression

Version 0.14

    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');

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.

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.

WWW::Mechanize

Compress::Zlib

Peter Giessner "cardb@planet-elektronik.de"

Copyright (c) 2007, Peter Giessner "cardb@planet-elektronik.de". All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

2018-08-14 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.