packages feed

http-streams 0.8.9.4 → 0.8.9.6

raw patch · 4 files changed

+18/−11 lines, 4 filesdep −system-fileiodep −system-filepath

Dependencies removed: system-fileio, system-filepath

Files

http-streams.cabal view
@@ -1,6 +1,6 @@ cabal-version:       1.24 name:                http-streams-version:             0.8.9.4+version:             0.8.9.6 synopsis:            An HTTP client using io-streams description:  An HTTP client, using the Snap Framework's 'io-streams' library to@@ -15,9 +15,9 @@ license-file:        LICENSE author:              Andrew Cowie <istathar@gmail.com> maintainer:          Andrew Cowie <istathar@gmail.com>-copyright:           © 2012-2021 Athae Eredh Siniath and Others+copyright:           © 2012-2022 Athae Eredh Siniath and Others category:            Web, IO-Streams-tested-with:         GHC == 8.10.4+tested-with:         GHC == 8.10.7, GHC == 9.0.2, GHC == 9.2.1 stability:           experimental homepage:            https://github.com/aesiniath/http-streams/ bug-reports:         https://github.com/aesiniath/http-streams/issues@@ -117,8 +117,6 @@                      random,                      snap-core       >= 1.0    && < 1.2,                      snap-server     >= 1.1    && < 1.2,-                     system-fileio   >= 0.3.10 && < 0.4,-                     system-filepath >= 0.4.1  && < 0.5,                      text,                      unordered-containers,                      aeson,
lib/Network/Http/Inconvenience.hs view
@@ -140,7 +140,12 @@     !low = toDigit $ fromEnum $ c .&. 0xf     !hi = toDigit $ (c .&. 0xf0) `shiftr` 4 -    shiftr (W8# a#) (I# b#) = I# (word2Int# (uncheckedShiftRL# a# b#))+    shiftr (W8# a#) (I# b#) = I# (word2Int# (uncheckedShiftRL'# a# b#))+#if MIN_VERSION_base(4,16,0)+    uncheckedShiftRL'# a# b# = word8ToWord# (uncheckedShiftRLWord8# a# b#)+#else+    uncheckedShiftRL'# = uncheckedShiftRL#+#endif  urlEncodeTable :: HashSet Char urlEncodeTable = HashSet.fromList $! filter f $! map w2c [0 .. 255]
tests/MockServer.hs view
@@ -29,8 +29,7 @@ import qualified Data.ByteString.Char8 as S import qualified Data.ByteString.Lazy.Char8 as L import Data.Maybe (fromMaybe)-import Filesystem (getSize)-import Filesystem.Path.CurrentOS (decodeString)+import System.Directory (getFileSize) import Snap.Core import Snap.Http.Server import Snap.Util.FileServe@@ -112,7 +111,7 @@     let f' = S.concat ["tests/", i']     let f = S.unpack f' -    l <- liftIO $ getSize $ decodeString f+    l <- liftIO $ getFileSize f      let t = fileType defaultMimeTypes f     modifyResponse $ setContentType t
tests/TestSuite.hs view
@@ -7,6 +7,7 @@ -- available to you by its authors as open source software: you can -- redistribute it and/or modify it under a BSD licence. --+{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE OverloadedStrings #-} @@ -40,8 +41,12 @@     (.=),  ) import Data.Aeson.Encode.Pretty+#if MIN_VERSION_aeson(2,0,0)+import qualified Data.Aeson.KeyMap as KeyMap+#else+import qualified Data.HashMap.Strict as KeyMap+#endif import Data.Bits-import qualified Data.HashMap.Strict as Map import Data.Maybe (fromJust) import Data.Monoid import Data.String@@ -746,7 +751,7 @@          x <- get url jsonHandler         let (Object o) = x-        let (Just v) = Map.lookup "label" o+        let (Just v) = KeyMap.lookup "label" o         let (String t) = v          assertEqual "Incorrect response" "Europe (EU27)" t