happstack-server 7.7.1 → 7.7.1.1
raw patch · 2 files changed
+8/−5 lines, 2 filesdep −network-bsdPVP ok
version bump matches the API change (PVP)
Dependencies removed: network-bsd
API changes (from Hackage documentation)
Files
happstack-server.cabal view
@@ -1,5 +1,5 @@ Name: happstack-server-Version: 7.7.1+Version: 7.7.1.1 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@@ -63,7 +63,6 @@ if flag(network-uri) build-depends: network >= 3.0.0 && < 3.2,- network-bsd >= 2.8.1 && < 2.9, network-uri >= 2.6 && < 2.7 else build-depends: network < 2.6
src/Happstack/Server/Internal/Listen.hs view
@@ -11,9 +11,9 @@ import Control.Concurrent (forkIO, killThread, myThreadId) import Control.Monad import qualified Data.Maybe as Maybe-import Network.BSD (getProtocolNumber) import qualified Network.Socket as Socket import System.IO.Error (isFullError)+import Foreign.C (CInt) {- #ifndef mingw32_HOST_OS -}@@ -25,6 +25,12 @@ log':: Priority -> String -> IO () log' = logM "Happstack.Server.HTTP.Listen" +-- Meant to be TCP in practise.+-- See https://www.gnu.org/software/libc/manual/html_node/Creating-a-Socket.html+-- which says "zero is usually right". It could theoretically be SCTP, but it+-- would be a bizarre system that defaults to SCTP over TCP.+proto :: CInt+proto = Socket.defaultProtocol {- Network.listenOn binds randomly to IPv4 or IPv6 or both,@@ -34,7 +40,6 @@ listenOn :: Int -> IO Socket.Socket listenOn portm = do- proto <- getProtocolNumber "tcp" E.bracketOnError (Socket.socket Socket.AF_INET Socket.Stream proto) (Socket.close)@@ -49,7 +54,6 @@ -> Int -- ^ port number to listen on -> IO Socket.Socket listenOnIPv4 ip portm = do- proto <- getProtocolNumber "tcp" hostAddr <- inet_addr ip E.bracketOnError (Socket.socket Socket.AF_INET Socket.Stream proto)