From eea5766cbae58af29e3264c4b173aa796adbffc2 Mon Sep 17 00:00:00 2001 From: Wilmar van Heerden Date: Wed, 10 Jul 2019 14:22:48 +0200 Subject: [PATCH 1/2] Add headers option on RemoteFile/Http - Add an option :headers key for the caller to provide custom headers --- lib/cocoapods-core/specification/dsl.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/cocoapods-core/specification/dsl.rb b/lib/cocoapods-core/specification/dsl.rb index 390813214..e85e65171 100644 --- a/lib/cocoapods-core/specification/dsl.rb +++ b/lib/cocoapods-core/specification/dsl.rb @@ -305,7 +305,7 @@ module DSL :git => [:tag, :branch, :commit, :submodules].freeze, :svn => [:folder, :tag, :revision].freeze, :hg => [:revision].freeze, - :http => [:flatten, :type, :sha256, :sha1].freeze, + :http => [:flatten, :type, :sha256, :sha1, :headers].freeze, }.freeze # @!method source=(source) From 78d49d4f39842dcbc4b8dbb931d0fd5632f5f24b Mon Sep 17 00:00:00 2001 From: Wilmar van Heerden Date: Wed, 10 Jul 2019 22:27:19 +0200 Subject: [PATCH 2/2] Add changelog entry for :headers option --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 432adebbb..892d925e3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,11 @@ [Samuel Giddins](https://github.com/segiddins) [#520](https://github.com/CocoaPods/Core/pull/520) +* Add `:headers` option to allow passing in custom headers to `cURL` when downloading source via the `:http` download strategy. + [Wilmar van Heerden](https://github.com/wilmarvh) + [cocoapods-downloader#89](https://github.com/CocoaPods/cocoapods-downloader/issues/89) + [#557](https://github.com/CocoaPods/Core/pull/557) + ##### Bug Fixes * Emit an error when a Podspec has an incorrect type for the `source` attribute