Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

linkchecker...

  • Loading branch information...
commit 109de3b2303500928b0ef7485a7976c067bd7033 1 parent 190dbec
Banana authored
2  lib/Insipid/Main.pm
@@ -1231,7 +1231,7 @@ sub update_bookmark {
1231 1231 set url = ?, md5 = ?, title = ?, description = ?,
1232 1232 access_level = ?,
1233 1233 linkcheck_status = 1,
1234   - linkcheck_status = '',
  1234 + linkcheck_status = ''
1235 1235 where (id = ?)";
1236 1236 my $sth = $dbh->prepare($sql);
1237 1237 $sth->execute($url, md5_hex("$url"), $title, $description, $access_level,
2  lib/Insipid/Stats.pm
@@ -73,7 +73,7 @@ sub groupByDomain {
73 73 my $uri = URI->new($row[1]);
74 74
75 75 if($row[2] eq 0) {
76   - print "<li><a href='$site_url/insipid.cgi?op=edit_bookmark&id=$row[0]'>".$row[1]."</a></li>";
  76 + print "<li><a href='$site_url/insipid.cgi?op=edit_bookmark&id=$row[0]'>".$row[1]."</a> (<a href='$site_url/insipid.cgi?op=delete_bookmark&id=$row[0]'>delete</a>)</li>";
77 77 }
78 78
79 79 if($domainGroup{$uri->host}) {
21 tools/linkcheck.pl
@@ -18,10 +18,19 @@
18 18 # USA
19 19 #
20 20
  21 +
  22 +#
  23 +# check exiting bookmark entries if they are available
  24 +# ssl entries will not be checked...
  25 +# if they return a non 200 HTTP Status code they will be marked and visible
  26 +# in the stats overview
  27 +#
  28 +
21 29 use warnings;
22 30 use strict;
23 31 use Getopt::Long;
24 32 use DBI;
  33 +use Crypt::SSLeay;
25 34 use LWP::UserAgent;
26 35
27 36 BEGIN {
@@ -67,7 +76,11 @@ BEGIN
67 76 $ua->timeout(5);
68 77 $ua->show_progress(1);
69 78 $ua->agent("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11");
70   - $ua->proxy(['http'], $opt_proxy) if $opt_proxy;
  79 +
  80 + $ua->proxy([ 'http', 'https' ], $opt_proxy) if $opt_proxy;
  81 +
  82 + $ua->ssl_opts('verify_hostname' => 0);
  83 + $ua->protocols_allowed(undef); # all are allowed
71 84
72 85 $query = "UPDATE `$tbl_bookmarks`
73 86 SET `linkcheck_status` = ?,
@@ -78,7 +91,11 @@ BEGIN
78 91 while (my $hr = $sth->fetchrow_hashref) {
79 92 print $hr->{url}." ";
80 93
81   - my $response = $ua->head($hr->{url});
  94 + # ssl not working correctly so avoid those bookmarks
  95 + next if $hr->{url} =~ m/https:/g;
  96 +
  97 + #my $response = $ua->head($hr->{url});
  98 + my $response = $ua->get($hr->{url});
82 99 my $status = 0;
83 100
84 101 if ($response->is_success) {

0 comments on commit 109de3b

Please sign in to comment.
Something went wrong with that request. Please try again.