Remove http-conduit (<2.2.0) constraint

Since https://github.com/aristidb/aws/issues/206 is resolved, this
constraint is no longer necessary. However, http-conduit (>=2.2.0)
requires http-client (>=0.5.0) which introduces some breaking changes.
This commit also implements those changes depending on the version.
Fixes: https://git-annex.branchable.com/bugs/Build_with_aws_head_fails/

Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
This commit is contained in:
Alper Nebi Yasak 2016-12-10 15:24:27 +03:00 committed by Joey Hess
parent bbc5e4f4f3
commit 93a22a1c97
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
4 changed files with 33 additions and 3 deletions

View file

@ -49,6 +49,12 @@ 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 = Nothing
#endif
type BucketName = String
remote :: RemoteType
@ -430,7 +436,7 @@ withS3HandleMaybe c gc u a = do
where
s3cfg = s3Configuration c
httpcfg = managerSettings
{ managerResponseTimeout = Nothing }
{ managerResponseTimeout = responseTimeoutNone }
s3Configuration :: RemoteConfig -> S3.S3Configuration AWS.NormalQuery
s3Configuration c = cfg