From: Luke Reeves Date: Sun, 12 Jul 2009 15:54:34 +0000 (-0400) Subject: Fixed snapshot parsing and viewing X-Git-Tag: 2.1-alpha-2019-0-29~152 X-Git-Url: http://91.132.146.200/gitweb/?a=commitdiff_plain;h=b99f0f86eff7ddc3edb46aa6320bd8b10053c5d4;p=insipid.git Fixed snapshot parsing and viewing --- diff --git a/lib/Insipid/Snapshots.pm b/lib/Insipid/Snapshots.pm index 9b802b4..ea93dd4 100755 --- a/lib/Insipid/Snapshots.pm +++ b/lib/Insipid/Snapshots.pm @@ -57,9 +57,6 @@ parsepage fetch_url ); -use SelfLoader; -__DATA__ - my $ua = LWP::UserAgent->new(timeout=>30); if(get_option('proxy_host') ne '') { my $proxy_host = get_option('proxy_host'); @@ -120,7 +117,8 @@ sub fetch_url { if(defined($roverride)) { $referer = $roverride; } my $md5 = md5_hex($url); - my $req = HTTP::Request->new(GET => $url); + my $req = HTTP::Request->new(GET => $url) or die "Can't fetch page: $!\n"; + if($referer ne '') { $req->header( referer => $referer ); } my $res = $ua->request($req);