This is an automated email from the ASF dual-hosted git repository.

sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git


The following commit(s) were added to refs/heads/master by this push:
     new c793b28  +=.rar; allow for missing content-type
c793b28 is described below

commit c793b28fea522674b64266b0f8fc783a36363e5a
Author: Sebb <[email protected]>
AuthorDate: Thu Jan 9 00:12:18 2020 +0000

    +=.rar; allow for missing content-type
---
 tools/download_check.rb | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/tools/download_check.rb b/tools/download_check.rb
index 513b70f..f3249c4 100755
--- a/tools/download_check.rb
+++ b/tools/download_check.rb
@@ -31,7 +31,7 @@ $NOFOLLOW = false # may be reset
 $VERSION = nil
 
 # match an artifact
-ARTIFACT_RE = %r{/([^/]+\.(tar|tar\.gz|zip|tgz|tar\.bz2|jar|war))$}
+ARTIFACT_RE = %r{/([^/]+\.(tar|tar\.gz|zip|tgz|tar\.bz2|jar|war|rar))$}
 
 def init
   # build a list of validation errors
@@ -243,12 +243,13 @@ ALIASES = {
     'sig' => 'asc',
     'pgp' => 'asc',
     'signature' => 'asc',
+    'pgp signature' => 'asc',
 }
 # Convert text reference to extension
 # e.g. SHA256 => sha256; [SIG] => asc
 def text2ext(txt)
-    if txt.size <= 10
-        tmp = txt.downcase.sub(%r{^\[(.+)\]$},'\1').sub('-','')
+    if txt.size <= 16
+        tmp = txt.downcase.sub(%r{^\[(.+)\]$},'\1').sub('-','').sub(' 
checksum','')
         ALIASES[tmp] || tmp
     else
         txt
@@ -473,8 +474,10 @@ def _checkDownloadPage(path, tlp, version)
           cl = res.content_length
           if ct and cl
             I "OK: #{ct} #{cl} #{path}"
+          elsif cl
+            W "NAK: ct='#{ct}' cl='#{cl}' #{path}"
           else
-            E "NAK: #{ct} #{cl} #{path}"
+            E "NAK: ct='#{ct}' cl='#{cl}' #{path}"
           end
         else
           E "Could not find link for #{name} in #{h}"

Reply via email to