Adding the header option to CurlDownloadStrategy.

It's easy to access github private resources later through specific `header` settings.
e.g.
```
cask 'XXXX' do
...
  url "https://raw.githubusercontent.com/....",
      header : "Authorization: token #{ENV['HOMEBREW_GITHUB_API_TOKEN']}"
...
end
 ```
This commit is contained in:
沙漠之子 2019-10-07 16:19:33 +08:00 committed by GitHub
parent e407da3d06
commit e1a592c76c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -421,6 +421,8 @@ class CurlDownloadStrategy < AbstractFileDownloadStrategy
args += ["--user", meta.fetch(:user)] if meta.key?(:user)
args += ["-H", meta.fetch(:header)] if meta.key?(:header)
args
end