from the Archive
the thing that fascinates me most about the traffic growth on this server is how much incoming bandwidth it chews. (mostly the result of having to pull down web content in response to ping requests on blo.gs, i believe.)
i finally enabled compressed content handling for the pings. apparently my install of php and libcurl finally caught up with the times when i wasn’t looking. now we’ll see what blows up.
does LWP really not have gzip or deflate handling? that seems very odd. i couldn’t find any other perl package that implements it, either.
Comments
Add a comment
Sorry, comments on this post are closed.
LWP doesn't have gzip support for Accept-Encoding built in (though it does for Transfer-Encoding, I think--check out Net::HTTP::Methods).
But you can add it fairly easily using Compress::Zlib. Before making the request, do this:
$req->header('Accept-Encoding', 'gzip');
And then when you receive the response:
if ($res->content_encoding && $res->content_encoding eq 'gzip') { $content = Compress::Zlib::memGunzip($content); }
Hope this helps!