mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-15 00:03:28 +01:00
fuzzymatcher: better fix for mime-type matching if no mime
This commit is contained in:
parent
b3bc7765a1
commit
24c968640d
@ -162,8 +162,12 @@ class FuzzyMatcher(object):
|
||||
if not rule.match_filters:
|
||||
return True
|
||||
|
||||
mime = cdx.get('mime')
|
||||
if not mime:
|
||||
return False
|
||||
|
||||
for match_filter in rule.match_filters:
|
||||
if match_filter['mime'] in (cdx.get('mime', ''), '*'):
|
||||
if match_filter['mime'] in (mime, '*'):
|
||||
return match_filter['match'].search(url)
|
||||
|
||||
return False
|
||||
|
Loading…
x
Reference in New Issue
Block a user