jpclizbe  committed ad3d160

HTML cleanup in 1.1.2 broke the spider tool. Fixed

In 1.1.2 the HTML of the stats page was cleaned up and table rows were
balanced with the addition of closing </td></td>. This broke the spider
tool which only expected the opening <td><tr>. This fix removes the closing
HTML if present allowing the spider tool to once again crawl the SKS network.

  • Participants
  • Parent commits 0374b3d
  • Branches default

Comments (0)

Files changed (2)

     key dump ahead of download/import, and direct verification of checksums
     using md5sum -c <metadata-file>.  
   - OID fixes for ECC -- force int64 use (fixes issue on 32-bit systems)
+  - HTML cleanup in 1.1.2 broke the spider tool. Fixed
   - Fix X-HKP-Results-Count so that limit=0 returns no results, but include
 let start_line = Str.regexp "<h2>Gossip Peers.*"
 let whitespace = Str.regexp "[ \t<]+"
+let end_td = Str.regexp "</td></tr>$"
 let get_peer line =
   if line </> (0,8) = "<tr><td>" then
-    match Str.split whitespace (line </> (8,0)) with
+    match Str.split whitespace (Str.global_replace end_td "" line </> (8,0)) with
     | host::port::_ ->
         let port = int_of_string port in
         Some (host,port)