Merge branch 'tvh-support-tls'

This commit is contained in:
Christian Marie 2015-02-02 12:39:55 +11:00
commit cdbe95bcdf
4 changed files with 6 additions and 1 deletions

View File

@ -5,8 +5,10 @@ ghc:
before_install: before_install:
- git clone https://github.com/haskell-servant/servant.git - git clone https://github.com/haskell-servant/servant.git
- git clone https://github.com/haskell-servant/servant-server.git
- cabal sandbox init - cabal sandbox init
- cabal sandbox add-source servant/ - cabal sandbox add-source servant/
- cabal sandbox add-source servant-server/
notifications: notifications:
irc: irc:

View File

@ -44,6 +44,7 @@ library
, either , either
, exceptions , exceptions
, http-client , http-client
, http-client-tls
, http-types , http-types
, network-uri >= 2.6 , network-uri >= 2.6
, safe , safe

View File

@ -19,6 +19,7 @@ import Data.String.Conversions
import Data.Text import Data.Text
import Data.Text.Encoding import Data.Text.Encoding
import Network.HTTP.Client import Network.HTTP.Client
import Network.HTTP.Client.TLS
import Network.HTTP.Types import Network.HTTP.Types
import Network.URI import Network.URI
import Servant.Common.BaseUrl import Servant.Common.BaseUrl
@ -91,7 +92,7 @@ reqToRequest req (BaseUrl reqScheme reqHost reqPort) =
{-# NOINLINE __manager #-} {-# NOINLINE __manager #-}
__manager :: MVar Manager __manager :: MVar Manager
__manager = unsafePerformIO (newManager defaultManagerSettings >>= newMVar) __manager = unsafePerformIO (newManager tlsManagerSettings >>= newMVar)
__withGlobalManager :: (Manager -> IO a) -> IO a __withGlobalManager :: (Manager -> IO a) -> IO a
__withGlobalManager action = modifyMVar __manager $ \ manager -> do __withGlobalManager action = modifyMVar __manager $ \ manager -> do

View File

@ -253,3 +253,4 @@ pathGen = listOf $ elements $
filter (not . (`elem` "?%[]/#")) $ filter (not . (`elem` "?%[]/#")) $
filter isPrint $ filter isPrint $
map chr [0..127] map chr [0..127]