HeaderMatch: Fix content-disposition regex logic

This commit is contained in:
Sam Ford
2020-12-19 19:34:26 -05:00
parent 7f40198506
commit 8b40d959bf
@@ -47,7 +47,7 @@ module Homebrew
if (filename = merged_headers["content-disposition"])
if regex
match ||= location[regex, 1]
match ||= filename[regex, 1]
else
v = Version.parse(filename, detected_from_url: true)
match ||= v.to_s unless v.null?