+=.rar; allow for missing content-type
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 @@
$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 @@
'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 @@
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}"