summaryrefslogtreecommitdiff
path: root/Annex/Content.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Annex/Content.hs')
-rw-r--r--Annex/Content.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/Annex/Content.hs b/Annex/Content.hs
index bffef19f4..45e8e9d47 100644
--- a/Annex/Content.hs
+++ b/Annex/Content.hs
@@ -514,10 +514,8 @@ saveState nocommit = doSideAction $ do
downloadUrl :: [Url.URLString] -> FilePath -> Annex Bool
downloadUrl urls file = go =<< annexWebDownloadCommand <$> Annex.getGitConfig
where
- go Nothing = do
- opts <- map Param . annexWebOptions <$> Annex.getGitConfig
- headers <- getHttpHeaders
- anyM (\u -> Url.withUserAgent $ Url.download u headers opts file) urls
+ go Nothing = Url.withUrlOptions $ \uo ->
+ anyM (\u -> Url.download u file uo) urls
go (Just basecmd) = liftIO $ anyM (downloadcmd basecmd) urls
downloadcmd basecmd url =
boolSystem "sh" [Param "-c", Param $ gencmd url basecmd]