mirror of
https://github.com/webrecorder/pywb.git
synced 2025-03-24 06:59:52 +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:
|
if not rule.match_filters:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
mime = cdx.get('mime')
|
||||||
|
if not mime:
|
||||||
|
return False
|
||||||
|
|
||||||
for match_filter in rule.match_filters:
|
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 match_filter['match'].search(url)
|
||||||
|
|
||||||
return False
|
return False
|
||||||
|
Loading…
x
Reference in New Issue
Block a user