summaryrefslogtreecommitdiff
path: root/Annex
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2012-04-22 01:13:09 -0400
committerGravatar Joey Hess <joey@kitenet.net>2012-04-22 01:13:09 -0400
commit84ac8c58db30637db4fb88566530b6293f12dab0 (patch)
tree72b7d1bae98ee22b34d722554069b68eea47513f /Annex
parent5fbe83f595bf5957376544ee83b3cc46cc2323ed (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.hs3
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. -}