From b99f0f86eff7ddc3edb46aa6320bd8b10053c5d4 Mon Sep 17 00:00:00 2001 From: Luke Reeves Date: Sun, 12 Jul 2009 11:54:34 -0400 Subject: [PATCH] Fixed snapshot parsing and viewing --- lib/Insipid/Snapshots.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) 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); -- 2.39.5