@@ -585,10 +585,10 @@ req' method url body options m = do
585585 withReqManager (m request)
586586
587587-- | Perform an action using the global implicit 'L.Manager' that the rest
588−-- of the library uses. This allows us to reuse connections that the
588+-- of the library uses. This allows to reuse connections that the
589589-- 'L.Manager' controls.
590590withReqManager :: (MonadIO m) => (L.Manager -> m a) -> m a
591−withReqManager m = m globalManager
591+withReqManager m = liftIO (readIORef globalManager) >>= m
592592
593593-- | The global 'L.Manager' that 'req' uses. Here we just go with the
594594-- default settings, so users don't need to deal with this manager stuff at
@@ -601,16 +601,16 @@ withReqManager m = m globalManager
601601-- manager. From that moment on the 'IORef' will be just reused—exactly the
602602-- behavior we want here in order to maximize connection sharing. GHC could
603603-- spoil the plan by inlining the definition, hence the @NOINLINE@ pragma.
604−globalManager :: L.Manager
604+globalManager :: IORef L.Manager
605605globalManager = unsafePerformIO $ do
606606 context <- NC.initConnectionContext
607607 let settings =
608608 L.mkManagerSettingsContext
609609 (Just context)
610− def
610+ (NC.TLSSettingsSimple False False False def)
611611 Nothing
612612 manager <- L.newManager settings
613− return manager
613+ newIORef manager
614614{-# NOINLINE globalManager #-}
615615
616616----------------------------------------------------------------------------
@@ -716,6 +716,7 @@ data HttpConfig = HttpConfig
716716 -- @since 3.6.0
717717 httpConfigBodyPreviewLength :: forall a. (Num a) => a
718718 }
719+ deriving (Typeable)
719720
720721-- | The default value of 'HttpConfig'.
721722--
@@ -1024,7 +1025,7 @@ instance (HttpMethod method) => RequestComponent (Tagged "method" method) where
10241025-- > -- https://%D1%8E%D0%BD%D0%B8%D0%BA%D0%BE%D0%B4.%D1%80%D1%84
10251026data Url (scheme :: Scheme) = Url Scheme (NonEmpty Text)
10261027 -- NOTE The second value is the path segments in reversed order.
1027− deriving (Eq, Ord, Show, Data, Generic)
1028+ deriving (Eq, Ord, Show, Data, Typeable, Generic)
10281029
10291030type role Url nominal
10301031
@@ -2011,7 +2012,7 @@ data HttpException
20112012 | -- | A wrapper with Aeson-produced 'String' describing why decoding
20122013 -- failed
20132014 JsonHttpException String
2014− deriving (Show, Generic)
2015+ deriving (Show, Typeable, Generic)
20152016
20162017instance Exception HttpException
20172018
@@ -2048,4 +2049,4 @@ data Scheme
20482049 Http
20492050 | -- | HTTPS
20502051 Https
2051− deriving (Eq, Ord, Show, Data, Generic, TH.Lift)
2052+ deriving (Eq, Ord, Show, Data, Typeable, Generic, TH.Lift)