summaryrefslogtreecommitdiff
path: root/Remote/Web.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Remote/Web.hs')
-rw-r--r--Remote/Web.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Remote/Web.hs b/Remote/Web.hs
index 304f191d3..71591b7aa 100644
--- a/Remote/Web.hs
+++ b/Remote/Web.hs
@@ -115,6 +115,7 @@ urlexists url = do
_ <- setopt curl (CurlURL url)
_ <- setopt curl (CurlNoBody True)
_ <- setopt curl (CurlFailOnError True)
+ _ <- setopt curl (CurlFollowLocation True)
res <- perform curl
return $ res == CurlOK
@@ -122,5 +123,5 @@ download :: [URLString] -> FilePath -> Annex Bool
download [] _ = return False
download (url:us) file = do
showProgress -- make way for curl progress bar
- ok <- liftIO $ boolSystem "curl" [Params "-C - -# -o", File file, File url]
+ ok <- liftIO $ boolSystem "curl" [Params "-L -C - -# -o", File file, File url]
if ok then return ok else download us file