diff options
author | Andreas Scherbaum | 2018-08-15 07:59:28 +0000 |
---|---|---|
committer | Andreas Scherbaum | 2018-08-15 07:59:28 +0000 |
commit | e02bfdefb06c404501bfe5821097fc7f6f786bac (patch) | |
tree | 08b17d15fc58fdf7cc6d27d0e9fba7aa2340b4d7 | |
parent | ce5ae55a505f8bbf0665e673985185312e04df19 (diff) |
Rewrite urls to httpsv2
-rwxr-xr-x | docbot.pl | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -3773,12 +3773,12 @@ sub handle_command_learn { if ($keyword =~ /^$url_pattern/) { $url = $keyword; # rewrite to current - if ($url =~ /^(http:\/\/.*?postgresql\.org\/docs\/)[0-9\.]+(\/.*)$/i) { - $url = $1 . "current" . $2; + if ($url =~ /^https?:\/\/(.*?postgresql\.org\/docs\/)[0-9\.]+(\/.*)$/i) { + $url = 'https://' . $1 . "current" . $2; } # rewrite to static - if ($url =~ /^(http:\/\/\/\/.*?postgresql\.org\/docs\/current\/)interactive(\/.*)$/i) { - $url = $1 . "static" . $2; + if ($url =~ /^https?:\/\/(.*?postgresql\.org\/docs\/current\/)interactive(\/.*)$/i) { + $url = 'https://' . $1 . "static" . $2; } last; } |