fix build with old http-client versions
This commit is contained in:
parent
cd4c97156e
commit
0a2f7c261f
2 changed files with 6 additions and 8 deletions
|
@ -23,7 +23,7 @@ import qualified Data.Map as M
|
|||
import Data.Char
|
||||
import Network.Socket (HostName)
|
||||
import Network.HTTP.Conduit (Manager, newManager)
|
||||
import Network.HTTP.Client (managerResponseTimeout, responseStatus, responseBody, RequestBody(..))
|
||||
import Network.HTTP.Client (responseStatus, responseBody, RequestBody(..))
|
||||
import Network.HTTP.Types
|
||||
import Control.Monad.Trans.Resource
|
||||
import Control.Monad.Catch
|
||||
|
@ -50,13 +50,6 @@ import Annex.Content
|
|||
import Annex.Url (withUrlOptions)
|
||||
import Utility.Url (checkBoth, managerSettings, closeManager)
|
||||
|
||||
#if MIN_VERSION_http_client(0,5,0)
|
||||
import Network.HTTP.Client (responseTimeoutNone)
|
||||
#else
|
||||
responseTimeoutNone :: Maybe Int
|
||||
responseTimeoutNone = Nothing
|
||||
#endif
|
||||
|
||||
type BucketName = String
|
||||
|
||||
remote :: RemoteType
|
||||
|
|
|
@ -50,6 +50,11 @@ closeManager :: Manager -> IO ()
|
|||
closeManager _ = return ()
|
||||
#endif
|
||||
|
||||
#if ! MIN_VERSION_http_client(0,5,0)
|
||||
responseTimeoutNone :: Maybe Int
|
||||
responseTimeoutNone = Nothing
|
||||
#endif
|
||||
|
||||
managerSettings :: ManagerSettings
|
||||
#if MIN_VERSION_http_conduit(2,1,7)
|
||||
managerSettings = tlsManagerSettings
|
||||
|
|
Loading…
Reference in a new issue