happstack-server 7.9.0 → 7.9.2
raw patch · 5 files changed
+14/−6 lines, 5 filesdep ~xhtmlPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: xhtml
API changes (from Hackage documentation)
- Happstack.Server.Internal.Monads: instance (Control.Monad.Trans.Error.Error e, Happstack.Server.Internal.Monads.FilterMonad a m) => Happstack.Server.Internal.Monads.FilterMonad a (Control.Monad.Trans.Error.ErrorT e m)
- Happstack.Server.Internal.Monads: instance (Control.Monad.Trans.Error.Error e, Happstack.Server.Internal.Monads.ServerMonad m) => Happstack.Server.Internal.Monads.ServerMonad (Control.Monad.Trans.Error.ErrorT e m)
- Happstack.Server.Internal.Monads: instance (Control.Monad.Trans.Error.Error e, Happstack.Server.Internal.Monads.WebMonad a m) => Happstack.Server.Internal.Monads.WebMonad a (Control.Monad.Trans.Error.ErrorT e m)
- Happstack.Server.Internal.Types: instance Control.Monad.Trans.Error.Error Happstack.Server.Internal.Types.Response
- Happstack.Server.Monads: instance (Happstack.Server.Monads.Happstack m, Control.Monad.Trans.Error.Error e) => Happstack.Server.Monads.Happstack (Control.Monad.Trans.Error.ErrorT e m)
- Happstack.Server.Response: instance Happstack.Server.Response.ToMessage Data.ByteString.Internal.ByteString
- Happstack.Server.RqData: instance (Control.Monad.Trans.Error.Error e, GHC.Base.Monoid e) => Control.Monad.Reader.Class.MonadReader r (Happstack.Server.RqData.ReaderError r e)
- Happstack.Server.RqData: instance (GHC.Base.Monad m, Control.Monad.Trans.Error.Error e, Happstack.Server.RqData.HasRqData m) => Happstack.Server.RqData.HasRqData (Control.Monad.Trans.Error.ErrorT e m)
- Happstack.Server.RqData: instance (GHC.Base.Monoid e, Control.Monad.Trans.Error.Error e) => GHC.Base.Alternative (Happstack.Server.RqData.ReaderError r e)
- Happstack.Server.RqData: instance (GHC.Base.Monoid e, Control.Monad.Trans.Error.Error e) => GHC.Base.Applicative (Happstack.Server.RqData.ReaderError r e)
- Happstack.Server.RqData: instance (GHC.Base.Monoid e, Control.Monad.Trans.Error.Error e) => GHC.Base.Monad (Happstack.Server.RqData.ReaderError r e)
- Happstack.Server.RqData: instance (GHC.Base.Monoid e, Control.Monad.Trans.Error.Error e, GHC.Base.MonadPlus (Data.Either.Either e)) => GHC.Base.MonadPlus (Happstack.Server.RqData.ReaderError r e)
- Happstack.Server.RqData: instance Control.Monad.Trans.Error.Error (Happstack.Server.RqData.Errors GHC.Base.String)
+ Happstack.Server.Response: instance Happstack.Server.Response.ToMessage Data.ByteString.Internal.Type.ByteString
+ Happstack.Server.RqData: instance (GHC.Base.MonadPlus (Data.Either.Either e), GHC.Base.Monoid e) => GHC.Base.Alternative (Happstack.Server.RqData.ReaderError r e)
+ Happstack.Server.RqData: instance (GHC.Base.Monoid e, GHC.Base.MonadPlus (Data.Either.Either e)) => GHC.Base.MonadPlus (Happstack.Server.RqData.ReaderError r e)
+ Happstack.Server.RqData: instance GHC.Base.Alternative (Data.Either.Either (Happstack.Server.RqData.Errors a))
+ Happstack.Server.RqData: instance GHC.Base.Alternative (Data.Either.Either (Happstack.Server.RqData.Errors a)) => GHC.Base.MonadPlus (Data.Either.Either (Happstack.Server.RqData.Errors a))
+ Happstack.Server.RqData: instance GHC.Base.Monoid e => Control.Monad.Reader.Class.MonadReader r (Happstack.Server.RqData.ReaderError r e)
+ Happstack.Server.RqData: instance GHC.Base.Monoid e => GHC.Base.Applicative (Happstack.Server.RqData.ReaderError r e)
+ Happstack.Server.RqData: instance GHC.Base.Monoid e => GHC.Base.Monad (Happstack.Server.RqData.ReaderError r e)
+ Happstack.Server.SimpleHTTP: runWebT :: forall m b. (Functor m, ToMessage b) => WebT m b -> m (Maybe Response)
- Happstack.Server.Internal.Multipart: type FileSaver = FilePath " tempdir" -> Int64 " quota" -> FilePath " filename of field" -> ByteString " content to save" -> IO (Bool, Int64, FilePath) " truncated?, saved bytes, saved filename"
+ Happstack.Server.Internal.Multipart: type FileSaver = -- | tempdir FilePath -> -- | quota Int64 -> -- | filename of field FilePath -> -- | content to save ByteString -> -- | truncated?, saved bytes, saved filename IO (Bool, Int64, FilePath)
- Happstack.Server.Internal.Types: type Headers = Map ByteString HeaderPair " lowercased name -> (realname, value)"
+ Happstack.Server.Internal.Types: type Headers = -- | lowercased name -> (realname, value) Map ByteString HeaderPair
- Happstack.Server.Internal.Types: type Host = (String, Int) " (hostname, port)"
+ Happstack.Server.Internal.Types: type Host = -- | (hostname, port) (String, Int)
- Happstack.Server.Types: type Headers = Map ByteString HeaderPair " lowercased name -> (realname, value)"
+ Happstack.Server.Types: type Headers = -- | lowercased name -> (realname, value) Map ByteString HeaderPair
- Happstack.Server.Types: type Host = (String, Int) " (hostname, port)"
+ Happstack.Server.Types: type Host = -- | (hostname, port) (String, Int)
Files
- happstack-server.cabal +3/−3
- src/Happstack/Server/Internal/Listen.hs +2/−1
- src/Happstack/Server/Internal/Types.hs +1/−1
- src/Happstack/Server/Response.hs +7/−1
- src/Happstack/Server/SimpleHTTP.hs +1/−0
happstack-server.cabal view
@@ -1,5 +1,5 @@ Name: happstack-server-Version: 7.9.0+Version: 7.9.2 Synopsis: Web related tools and services. Description: Happstack Server provides an HTTP server and a rich set of functions for routing requests, handling query parameters, generating responses, working with cookies, serving files, and more. For in-depth documentation see the Happstack Crash Course <http://happstack.com/docs/crashcourse/index.html> License: BSD3@@ -13,7 +13,7 @@ Extra-Source-Files: tests/Happstack/Server/Tests.hs README.md tested-with:- GHC == 9.8.1+ GHC == 9.8.2 GHC == 9.6.3 GHC == 9.4.7 GHC == 9.2.8@@ -74,7 +74,7 @@ Paths_happstack_server if flag(network-uri)- build-depends: network >= 3.0.0 && < 3.2,+ build-depends: network >= 3.0.0 && < 3.3, network-uri >= 2.6 && < 2.7 else build-depends: network < 2.6
src/Happstack/Server/Internal/Listen.hs view
@@ -1,6 +1,7 @@ {-# LANGUAGE BangPatterns, CPP, ScopedTypeVariables #-} module Happstack.Server.Internal.Listen(listen, listen',listenOn,listenOnIPv4) where +import Data.Maybe (isNothing) import Happstack.Server.Internal.Types (Conf(..), Request, Response) import Happstack.Server.Internal.Handler (request) import Happstack.Server.Internal.Socket (acceptLite)@@ -118,7 +119,7 @@ infi :: IO () infi = loop `catchSome` pe >> infi - infi `finally` (Socket.close s >> forceTimeoutAll tm)+ infi `finally` (Socket.close s >> when (isNothing $ threadGroup conf) (forceTimeoutAll tm)) {-- #ifndef mingw32_HOST_OS
src/Happstack/Server/Internal/Types.hs view
@@ -117,7 +117,7 @@ , validator :: Maybe (Response -> IO Response) -- ^ a function to validate the output on-the-fly , logAccess :: forall t. FormatTime t => Maybe (LogAccess t) -- ^ function to log access requests (see also: 'logMAccess') , timeout :: Int -- ^ number of seconds to wait before killing an inactive thread- , threadGroup :: Maybe TG.ThreadGroup -- ^ ThreadGroup for registering spawned threads for handling requests+ , threadGroup :: Maybe TG.ThreadGroup -- ^ ThreadGroup for registering spawned threads for handling requests. } -- | Default configuration contains no validator and the port is set to 8000
src/Happstack/Server/Response.hs view
@@ -26,6 +26,9 @@ , ifModifiedSince ) where +#if MIN_VERSION_xhtml(3000,3,0)+import qualified Data.ByteString.Builder as L+#endif import qualified Data.ByteString.Char8 as B import qualified Data.ByteString.Lazy.Char8 as L import qualified Data.ByteString.Lazy.UTF8 as LU (fromString)@@ -140,8 +143,11 @@ instance ToMessage XHtml.Html where toContentType _ = B.pack "text/html; charset=UTF-8"+#if MIN_VERSION_xhtml(3000,3,0)+ toMessage = L.toLazyByteString . XHtml.renderHtml+#else toMessage = LU.fromString . XHtml.renderHtml-+#endif instance ToMessage Blaze.Html where toContentType _ = B.pack "text/html; charset=UTF-8" toMessage = Blaze.renderHtml
src/Happstack/Server/SimpleHTTP.hs view
@@ -44,6 +44,7 @@ , bindPort , bindIPv4 , parseConfig+ , runWebT , waitForTermination -- * Re-exported modules -- ** Basic ServerMonad functionality