prophet-on-that
prophet-on-that

Reputation: 179

http-conduit-downloader: discrepancy in ghci behaviour vs executable behaviour

I'm experiencing some weird GHC behaviour. Using http-conduit-downloader, I'm making secure connections to a web server successfully. Data is downloaded correctly when using cabal repl. However, when running a test executable built off this code, all of my requests return DRError "Connection failed".

I'm sure I'm not accidentally building against the wrong version of the code. Is there perhaps a GHC flag that I'm missing that might be affecting the runtime behaviour, that cabal repl uses automatically?

GHC v7.8.3

http-conduit-downloader v1.0.21

Thanks for the help.

P.S. this problem came about as a workaround for https://stackoverflow.com/questions/26471020/haskell-tls-error-with-http-conduit

Upvotes: 0

Views: 39

Answers (1)

Christian Conkle
Christian Conkle

Reputation: 5992

A maintainer noted the solution in reply to the bug report you filed:

This is because of missing -threaded flag that seems to be required for HOpenSSL (and HTTPS sites). Add ghc-options: -threaded [to the Cabal file].

Upvotes: 1

Related Questions