HeaderMatch: Fix content-disposition regex logic

This commit is contained in:
Sam Ford 2020-12-19 00:47:21 -05:00
parent 7f40198506
commit 8b40d959bf
No known key found for this signature in database
GPG Key ID: 95209E46C7FFDEFE

View File

@ -47,7 +47,7 @@ module Homebrew
if (filename = merged_headers["content-disposition"]) if (filename = merged_headers["content-disposition"])
if regex if regex
match ||= location[regex, 1] match ||= filename[regex, 1]
else else
v = Version.parse(filename, detected_from_url: true) v = Version.parse(filename, detected_from_url: true)
match ||= v.to_s unless v.null? match ||= v.to_s unless v.null?