--- toast	2010/01/11 03:29:06	1.475
+++ toast	2010/01/11 03:41:49	1.476
@@ -1011,7 +1011,9 @@
   {
     openhttp(*HANDLE, $url, undef, $proxy);
     local($_);
+    $! = undef;
     $_ = <HANDLE>;
+    error("$url: $!") if $!;
     error("$url: unexpected EOF") unless defined($_);
     s/\r?\n?$//;
     m|^HTTP/[\w\.]+ [23]0[01237] | || error("$url: $_");
@@ -1021,6 +1023,7 @@
       $redirect = $1 if /^location:\s*(\S+)/i;
       last if /^\r?\n?$/;
     }
+    error("$url: $!") if $!;
     return $url unless $redirect;
     ($url) = linksfromstring("<a href=$redirect>", $url); # *wince*
   }