packages feed

hackage-security-HTTP 0.1.1.1 → 0.1.1.2

raw patch · 3 files changed

+31/−33 lines, 3 filesdep ~basedep ~bytestringdep ~mtlnew-uploaderPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: base, bytestring, mtl, network

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,3 +1,8 @@+0.1.1.2+-------+* Drop support for GHC < 8.4.+* Drop flag `use-network-uri` and support for `network-2.5`.+ 0.1.1.1 ------- * Add support for hackage-security-0.6
hackage-security-HTTP.cabal view
@@ -1,6 +1,7 @@ cabal-version:       1.12 name:                hackage-security-HTTP-version:             0.1.1.1+version:             0.1.1.2+ synopsis:            Hackage security bindings against the HTTP library description:         The hackage security library provides a 'HttpLib'                      abstraction to allow to bind against different HTTP@@ -15,9 +16,19 @@ homepage:            https://github.com/haskell/hackage-security bug-reports:         https://github.com/haskell/hackage-security/issues build-type:          Simple-tested-with:         GHC==8.10.1, GHC==8.8.3, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2,-                     GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2 +tested-with:+  GHC == 9.10.0+  GHC == 9.8.2+  GHC == 9.6.4+  GHC == 9.4.8+  GHC == 9.2.8+  GHC == 9.0.2+  GHC == 8.10.7+  GHC == 8.8.4+  GHC == 8.6.5+  GHC == 8.4.4+ extra-source-files:   ChangeLog.md @@ -25,17 +36,15 @@   type: git   location: https://github.com/haskell/hackage-security.git -flag use-network-uri-  description: Are we using network-uri?-  manual: False- library   exposed-modules:     Hackage.Security.Client.Repository.HttpLib.HTTP-  build-depends:       base             >= 4.5       && < 4.15,-                       bytestring       >= 0.9       && < 0.11,-                       HTTP             >= 4000.2.19 && < 4000.4,-                       mtl              >= 2.1       && < 2.3,-                       zlib             >= 0.5       && < 0.7,+  build-depends:       base             >= 4.11      && < 4.21,+                       bytestring       >= 0.10.8.2  && < 0.13,+                       HTTP             >= 4000.2.19 && < 4000.5,+                       mtl              >= 2.2.2     && < 2.4,+                       network-uri      >= 2.6       && < 2.7,+                       network          >= 2.6       && < 3.3,+                       zlib             >= 0.5       && < 0.8,                        hackage-security >= 0.5       && < 0.7   hs-source-dirs:      src   default-language:    Haskell2010@@ -47,11 +56,3 @@                        StandaloneDeriving   other-extensions:    CPP   ghc-options:         -Wall--  -- See comments in hackage-security.cabal-  if flag(use-network-uri)-    build-depends: network-uri >= 2.6 && < 2.7,-                   network     >= 2.6 && < 2.9-                            || >= 3.0 && < 3.2-  else-    build-depends: network     >= 2.5 && < 2.6
src/Hackage/Security/Client/Repository/HttpLib/HTTP.hs view
@@ -1,4 +1,3 @@-{-# LANGUAGE CPP #-} -- | Implementation of 'HttpClient' using the HTTP package module Hackage.Security.Client.Repository.HttpLib.HTTP (     withClient@@ -40,7 +39,7 @@ -- -- TODO: This currently uses the lazy bytestring API offered by the HTTP -- library. Unfortunately this provides no way of closing the connection when--- the callback decides it doens't require any further input. It seems+-- the callback decides it doesn't require any further input. It seems -- impossible however to implement a proper streaming API. -- See <https://github.com/haskell/HTTP/issues/86>. withClient :: (Browser -> HttpLib -> IO a) -> IO a@@ -62,7 +61,7 @@     -> IO a get browser reqHeaders uri callback = wrapCustomEx $ do     response <- request browser-      $ setRequestHeaders reqHeaders+      $ addRequestHeaders reqHeaders       -- avoid silly `Content-Length: 0` header inserted by `mkRequest`       $ removeHeader HTTP.HdrContentLength       $ HTTP.mkRequest HTTP.GET uri@@ -78,7 +77,7 @@ getRange browser reqHeaders uri (from, to) callback = wrapCustomEx $ do     response <- request browser       $ setRange from to-      $ setRequestHeaders reqHeaders+      $ addRequestHeaders reqHeaders       -- avoid silly `Content-Length: 0` header inserted by `mkRequest`       $ removeHeader HTTP.HdrContentLength       $ HTTP.mkRequest HTTP.GET uri@@ -133,17 +132,10 @@ instance Pretty InvalidProxy where   pretty (InvalidProxy p) = "Invalid proxy " ++ show p -#if MIN_VERSION_base(4,8,0) deriving instance Show UnexpectedResponse deriving instance Show InvalidProxy instance Exception UnexpectedResponse where displayException = pretty instance Exception InvalidProxy where displayException = pretty-#else-instance Show UnexpectedResponse where show = pretty-instance Show InvalidProxy where show = pretty-instance Exception UnexpectedResponse-instance Exception InvalidProxy-#endif  {-------------------------------------------------------------------------------   Additional operations@@ -234,8 +226,8 @@     -- See <http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html>     rangeHeader = "bytes=" ++ show from ++ "-" ++ show (to - 1) -setRequestHeaders :: HTTP.HasHeaders a => [HttpRequestHeader] -> a -> a-setRequestHeaders =+addRequestHeaders :: HTTP.HasHeaders a => [HttpRequestHeader] -> a -> a+addRequestHeaders =     foldr (.) id . map (uncurry HTTP.insertHeader) . trOpt []   where     trOpt :: [(HTTP.HeaderName, [String])]