Workaround for bug in an old version of cryptonite that broke https downloads, by using curl for downloads when git-annex is built with it.

This commit was supported by the NSF-funded DataLad project.
This commit is contained in:
Joey Hess 2018-05-20 14:12:18 -04:00
parent af4741b45f
commit 5204e1dd9d
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 8 additions and 0 deletions

View file

@ -2,6 +2,8 @@ git-annex (6.20180510) UNRELEASED; urgency=medium
* view, vadd: Fix crash when a git submodule has a name starting with a dot.
* Don't allow entering a view with staged or unstaged changes.
* Workaround for bug in an old version of cryptonite that broke https
downloads, by using curl for downloads when git-annex is built with it.
-- Joey Hess <id@joeyh.name> Mon, 14 May 2018 13:42:41 -0400

View file

@ -90,7 +90,13 @@ mkUrlOptions defuseragent reqheaders reqparams manager =
UrlOptions useragent reqheaders urldownloader applyrequest manager
where
urldownloader = if null reqparams
#if MIN_VERSION_cryptonite(0,6)
then DownloadWithConduit
#else
-- Work around for old cryptonite bug that broke tls.
-- https://github.com/vincenthz/hs-tls/issues/109
then DownloadWithCurl reqparams
#endif
else DownloadWithCurl reqparams
applyrequest = \r -> r { requestHeaders = requestHeaders r ++ addedheaders }
addedheaders = uaheader ++ otherheaders