diff options
author | Joey Hess <joey@kitenet.net> | 2012-04-22 01:13:09 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-04-22 01:13:09 -0400 |
commit | 84ac8c58db30637db4fb88566530b6293f12dab0 (patch) | |
tree | 72b7d1bae98ee22b34d722554069b68eea47513f /Annex | |
parent | 5fbe83f595bf5957376544ee83b3cc46cc2323ed (diff) |
Add annex.httpheaders and annex.httpheader-command config settings
Allow custom headers to be sent with all HTTP requests.
(Requested by the Internet Archive)
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/Content.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Annex/Content.hs b/Annex/Content.hs index c5771af28..01ee7d83d 100644 --- a/Annex/Content.hs +++ b/Annex/Content.hs @@ -310,7 +310,8 @@ saveState oneshot = do downloadUrl :: [Url.URLString] -> FilePath -> Annex Bool downloadUrl urls file = do o <- map Param . words <$> getConfig "annex.web-options" "" - liftIO $ anyM (\u -> Url.download u o file) urls + headers <- getHttpHeaders + liftIO $ anyM (\u -> Url.download u headers o file) urls {- Copies a key's content, when present, to a temp file. - This is used to speed up some rsyncs. -} |