From b6fb2e3a3384d2b9a92002aaf26c0c0d535ee4d3 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 24 Feb 2014 21:29:37 -0400 Subject: Make annex.web-options be used in several places that call curl. --- Config.hs | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'Config.hs') diff --git a/Config.hs b/Config.hs index 376a3a488..1510f7a74 100644 --- a/Config.hs +++ b/Config.hs @@ -80,10 +80,13 @@ setCrippledFileSystem b = do setConfig (annexConfig "crippledfilesystem") (Git.Config.boolConfig b) Annex.changeGitConfig $ \c -> c { annexCrippledFileSystem = b } -{- Gets the http headers to use. -} -getHttpHeaders :: Annex [String] -getHttpHeaders = do - v <- annexHttpHeadersCommand <$> Annex.getGitConfig - case v of - Just cmd -> lines <$> liftIO (readProcess "sh" ["-c", cmd]) - Nothing -> annexHttpHeaders <$> Annex.getGitConfig +{- Gets the http headers to use, and any configured command-line options. -} +getHttpHeadersOptions :: Annex ([String], [CommandParam]) +getHttpHeadersOptions = (,) <$> headers <*> options + where + headers = do + v <- annexHttpHeadersCommand <$> Annex.getGitConfig + case v of + Just cmd -> lines <$> liftIO (readProcess "sh" ["-c", cmd]) + Nothing -> annexHttpHeaders <$> Annex.getGitConfig + options = map Param . annexWebOptions <$> Annex.getGitConfig -- cgit v1.2.3