CGI-Buffer
view release on metacpan or search on metacpan
use LWP::UserAgent;
use LWP::ConnCache;
die "Usage: $0 url" unless(@ARGV);
my $ua = LWP::UserAgent->new(conn_cache => LWP::ConnCache->new());
$ua->agent($0);
# Turn off proxy, because the proxy may not pass on all
# information back to here. Squid does that :-(
$ua->no_proxy($ARGV[0]);
my $request = HTTP::Request->new(GET => $ARGV[0]);
$request->protocol('HTTP/1.1');
# HTTP::Response object
my $r = $ua->request($request);
die $r->status_line() unless($r->code() == 200);
my $rc = 0;
if(!defined($r->header('ETag'))) {
( run in 0.418 second using v1.01-cache-2.11-cpan-de7293f3b23 )