perl/modules/W3C/LinkChecker/bin checklink,4.57,4.58

Update of /sources/public/perl/modules/W3C/LinkChecker/bin
In directory hutz:/tmp/cvs-serv19189

Modified Files:
	checklink 
Log Message:
Clear contents of responses as soon as we've dealt with them.

Index: checklink
===================================================================
RCS file: /sources/public/perl/modules/W3C/LinkChecker/bin/checklink,v
retrieving revision 4.57
retrieving revision 4.58
diff -u -d -r4.57 -r4.58
--- checklink	29 Jul 2007 13:35:35 -0000	4.57
+++ checklink	29 Jul 2007 13:48:29 -0000	4.58
@@ -717,7 +717,10 @@
   } else {
     # Before fetching the document, we don't know if we'll be within the
     # recursion scope or not (think redirects).
-    return unless &in_recursion_scope($response->{absolute_uri});
+    if (!&in_recursion_scope($response->{absolute_uri})) {
+      $response->content("");
+      return;
+    }
 
     print $Opts{HTML} ? '<hr>' : '-' x 40, "\n";
   }
@@ -796,6 +799,7 @@
   my $p = &parse_document($uri, $absolute_uri,
                           $response->content(), 1,
                           $depth != 0);
+  $response->content("");
   my $base = URI->new($p->{base});
 
   # Check anchors
@@ -998,6 +1002,7 @@
       }
     }
     $response->{Stop} = 1;
+    $response->content("");
     return($response);
   }
 
@@ -1028,6 +1033,7 @@
       print "</p>\n" if $Opts{HTML};
     }
     $response->{Stop} = 1;
+    $response->content("");
   }
 
   # Ok, return the information
@@ -1212,8 +1218,8 @@
              $results{$uri}{location}{code},
              $results{$uri}{location}{message})
       if ($Opts{Verbose});
-    return;
   }
+  return;
 }
 
 ####################
@@ -1479,16 +1485,21 @@
   my $p;
   if ($being_processed) {
     # Can we really parse the document?
-    return unless defined($results{$uri}{location}{type});
-    if ($results{$uri}{location}{type} !~ $ContentTypes) {
+    my $done = 0;
+    if (!defined($results{$uri}{location}{type}) ||
+        $results{$uri}{location}{type} !~ $ContentTypes)
+    {
       &hprintf("Can't check content: Content-Type for '%s' is '%s'.\n",
                $uri, $results{$uri}{location}{type})
         if ($Opts{Verbose});
-      return;
+      $done = 1;
+    } else {
+      # Do it then
+      $p = &parse_document($uri, $response->base(),
+                           $response->content(), 0, $want_links);
     }
-    # Do it then
-    $p = &parse_document($uri, $response->base(),
-                         $response->content(), 0, $want_links);
+    $response->content("");
+    return if $done;
   } else {
     # We already had the information
     $p->{Anchors} = $results{$uri}{parsing}{Anchors};

Received on Sunday, 29 July 2007 13:48:34 UTC