title: Homebrew extend CurlDownloadStrategy with curl option
body: <p>can does anyone know how to extend the <code>CurlDownloadStrategy</code> from homebrew with a header? I already did research here and in the github issues but could not find any simple and working answer. Basically it's for gitlab and I need to set a header.</p>
  
  <p>I found a <a href="https://discourse.brew.sh/t/pouring-bottle-from-private-tap-fails/6062/4" rel="nofollow noreferrer">snippet</a> here, fixed a typo but when I run <code>brew install mytab/mytool --debug</code>
  it does not use the given <code>--header</code> option but the standard options as described in the official <a href="https://github.com/Homebrew/brew/blob/fdbf93536464062fc3f3053492f88fc5bc1f7b38/Library/Homebrew/download_strategy.rb#L277" rel="nofollow noreferrer">code</a></p>
  
  <p>Here's what I have:</p>
  
  <pre class="lang-rb prettyprint-override"><code>require "download_strategy"
  
  class PrivateRepositoryDownloadStrategy &lt; CurlDownloadStrategy
    def initialize(url, name, version, **meta)
      super
      set_gitlab_token
    end
  
    private
  
    def _fetch(url:, resolved_url:)
      args = ["--header", "Private-Token: #{@gitlab_token}"]
      curl_download(@url, *args, to: temporary_path)
    end
  
    def set_gitlab_token
      @gitlab_token = ENV["HOMEBREW_GITLAB_ACCESS_TKN"]
      unless @gitlab_token
        raise CurlDownloadStrategyError, "Environment variable HOMEBREW_GITLAB_ACCESS_TKN is required."
      end
    end
  end
  </code></pre>
  
  <p>Any ideas? :)</p>