snap-server 1.1.2.0 → 1.1.2.1
raw patch · 5 files changed
+51/−20 lines, 5 filesdep ~basedep ~bytestringdep ~containersnew-uploader
Dependency ranges changed: base, bytestring, containers, criterion, filepath, mtl, network, text, time, transformers, unix, unix-compat
Files
- README.md +1/−1
- pong/Main.hs +1/−1
- snap-server.cabal +31/−17
- src/Control/Concurrent/Extended.hs +13/−1
- src/Snap/Internal/Http/Server/Socket.hs +5/−0
README.md view
@@ -1,7 +1,7 @@ Snap Framework HTTP Server Library ---------------------------------- -[](https://travis-ci.org/snapframework/snap-server)+[](https://github.com/snapframework/snap-server/actions/workflows/ci.yml) This is the Snap Framework HTTP Server library. For more information about Snap, read the `README.SNAP.md` or visit the Snap project website at
pong/Main.hs view
@@ -77,4 +77,4 @@ killThread tid where- output os = Streams.write (Just $ fromByteString "pong") os >> return os+ output os = Streams.write (Just "pong") os >> return os
snap-server.cabal view
@@ -1,5 +1,5 @@ name: snap-server-version: 1.1.2.0+version: 1.1.2.1 synopsis: A web server for the Snap Framework description: Snap is a simple and fast web development framework and server written in@@ -96,11 +96,10 @@ Snap.Internal.Http.Server.TLS build-depends:- attoparsec >= 0.12 && < 0.14,- base >= 4.6 && < 4.15,+ attoparsec >= 0.12 && < 0.15,+ base >= 4.6 && < 5, blaze-builder >= 0.4 && < 0.5,- bytestring >= 0.9.1 && < 0.11,- bytestring-builder >= 0.10.4 && < 0.11,+ bytestring >= 0.9.1 && < 0.12, case-insensitive >= 1.1 && < 1.3, clock >= 0.7.1 && < 0.9, containers >= 0.3 && < 0.7,@@ -108,15 +107,15 @@ io-streams >= 1.3 && < 1.6, io-streams-haproxy >= 1.0 && < 1.1, lifted-base >= 0.1 && < 0.3,- mtl >= 2.0 && < 2.3,+ mtl >= 2.0 && < 2.4, network >= 2.3 && < 3.2, old-locale >= 1.0 && < 1.1, snap-core >= 1.0 && < 1.1,- text >= 0.11 && < 1.3,- time >= 1.0 && < 1.11,- transformers >= 0.3 && < 0.6,- unix-compat >= 0.2 && < 0.6,- vector >= 0.7 && < 0.13+ text >= 0.11 && < 2.1,+ time >= 1.0 && < 1.13,+ transformers >= 0.3 && < 0.7,+ unix-compat >= 0.2 && < 0.7,+ vector >= 0.7 && < 0.14 other-extensions: BangPatterns,@@ -135,10 +134,13 @@ if !impl(ghc >= 8.0) build-depends: semigroups >= 0.16 && < 0.19 + if !impl(ghc >= 7.8)+ build-depends: bytestring-builder >= 0.10.4 && < 0.11+ if flag(portable) || os(windows) cpp-options: -DPORTABLE else- build-depends: unix < 2.8+ build-depends: unix < 2.9 if flag(openssl) cpp-options: -DOPENSSL@@ -216,7 +218,6 @@ base, base16-bytestring >= 0.1 && < 1.1, blaze-builder,- bytestring-builder, bytestring, case-insensitive, clock,@@ -235,7 +236,7 @@ text, threads >= 0.5 && < 0.6, time,- transformers >= 0.3 && < 0.6,+ transformers, unix-compat, vector, @@ -266,6 +267,9 @@ if !impl(ghc >= 8.0) build-depends: semigroups + if !impl(ghc >= 7.8)+ build-depends: bytestring-builder+ if flag(portable) || os(windows) cpp-options: -DPORTABLE else@@ -328,7 +332,7 @@ blaze-builder, bytestring, bytestring-builder,- criterion >= 0.6 && < 1.6,+ criterion >= 0.6 && < 1.7, io-streams, io-streams-haproxy, snap-core,@@ -362,6 +366,7 @@ default-language: Haskell2010 other-modules:+ Control.Concurrent.Extended Paths_snap_server, Snap.Internal.Http.Server.Address, Snap.Internal.Http.Server.Clock,@@ -415,6 +420,7 @@ case-insensitive, clock, containers,+ filepath, io-streams, io-streams-haproxy, lifted-base,@@ -460,7 +466,11 @@ default-language: Haskell2010 other-modules:+ Control.Concurrent.Extended, Paths_snap_server,+ Snap.Http.Server,+ Snap.Http.Server.Config,+ Snap.Http.Server.Types, Snap.Internal.Http.Server.Address, Snap.Internal.Http.Server.Clock, Snap.Internal.Http.Server.Common,@@ -469,10 +479,13 @@ Snap.Internal.Http.Server.Parser, Snap.Internal.Http.Server.Session, Snap.Internal.Http.Server.Socket,+ Snap.Internal.Http.Server.TLS, Snap.Internal.Http.Server.Thread, Snap.Internal.Http.Server.TimeoutManager,- Snap.Internal.Http.Server.TLS,- Snap.Internal.Http.Server.Types+ Snap.Internal.Http.Server.Types,+ System.FastLogger,+ Test.Common.Rot13,+ Test.Common.TestHandler if flag(portable) || os(windows) cpp-options: -DPORTABLE@@ -509,6 +522,7 @@ clock, containers, directory,+ filepath, io-streams, io-streams-haproxy, lifted-base,
src/Control/Concurrent/Extended.hs view
@@ -19,7 +19,12 @@ #ifdef LABEL_THREADS import Control.Concurrent (forkIOWithUnmask, forkOnWithUnmask, myThreadId)+#if MIN_VERSION_base(4,18,0)+import qualified Data.ByteString.Char8 as C8+import GHC.Conc (labelThread)+#else import GHC.Base (labelThread#)+#endif import Foreign.C.String (CString) import GHC.IO (IO (..)) import GHC.Ptr (Ptr (..))@@ -77,6 +82,12 @@ -- | Like 'labelThread' but uses a Latin-1 encoded 'ByteString' instead of a -- 'String'. labelThreadBs :: ThreadId -> B.ByteString -> IO ()+#if MIN_VERSION_base(4,18,0)+labelThreadBs tid =+ -- The 'labelThread#' signature changed: it now requires a UTF-8 encoded+ -- ByteArray#.+ labelThread tid . C8.unpack+#else labelThreadBs tid bs = B.useAsCString bs $ labelThreadCString tid @@ -86,9 +97,10 @@ labelThreadCString (ThreadId t) (Ptr p) = IO $ \s -> case labelThread# t p s of s1 -> (# s1, () #)+#endif+ #elif defined(TESTSUITE) labelMe !_ = return $! () #else labelMe _label = return $! () #endif-
src/Snap/Internal/Http/Server/Socket.hs view
@@ -173,7 +173,12 @@ #ifdef HAS_SENDFILE sendFileFunc sock !_ builder fPath offset nbytes = bracket acquire closeFd go where+#if MIN_VERSION_unix(2,8,0)+ acquire = openFd fPath ReadOnly defaultFileFlags+#else acquire = openFd fPath ReadOnly Nothing defaultFileFlags+#endif+ #if MIN_VERSION_network(3,0,0) go fileFd = do sockFd <- Fd `fmap` fdSocket sock sendHeaders builder sockFd