diff options
author | Joey Hess <joey@kitenet.net> | 2014-02-24 21:29:37 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-02-24 21:29:37 -0400 |
commit | b6fb2e3a3384d2b9a92002aaf26c0c0d535ee4d3 (patch) | |
tree | 9dca4e7d6168983ebc0497672c4bdf6de7a82f31 /Command | |
parent | d2ff4e12d0ae0d32263e258ea7c2a283d1d92149 (diff) |
Make annex.web-options be used in several places that call curl.
Diffstat (limited to 'Command')
-rw-r--r-- | Command/AddUrl.hs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Command/AddUrl.hs b/Command/AddUrl.hs index 82b04f07b..da4da414f 100644 --- a/Command/AddUrl.hs +++ b/Command/AddUrl.hs @@ -134,8 +134,8 @@ perform relaxed url file = ifAnnexed file addurl geturl setUrlPresent key url next $ return True | otherwise = do - headers <- getHttpHeaders - (exists, samesize) <- Url.withUserAgent $ Url.check url headers $ keySize key + (headers, options) <- getHttpHeadersOptions + (exists, samesize) <- Url.withUserAgent $ Url.check url headers options (keySize key) if exists && samesize then do setUrlPresent key url @@ -192,8 +192,8 @@ download url file = do -} addSizeUrlKey :: URLString -> Key -> Annex Key addSizeUrlKey url key = do - headers <- getHttpHeaders - size <- snd <$> Url.withUserAgent (Url.exists url headers) + (headers, options) <- getHttpHeadersOptions + size <- snd <$> Url.withUserAgent (Url.exists url headers options) return $ key { keySize = size } cleanup :: URLString -> FilePath -> Key -> Maybe FilePath -> Annex Bool @@ -212,10 +212,10 @@ cleanup url file key mtmp = do nodownload :: Bool -> URLString -> FilePath -> Annex Bool nodownload relaxed url file = do - headers <- getHttpHeaders + (headers, options) <- getHttpHeadersOptions (exists, size) <- if relaxed then pure (True, Nothing) - else Url.withUserAgent $ Url.exists url headers + else Url.withUserAgent $ Url.exists url headers options if exists then do key <- Backend.URL.fromUrl url size |