packages feed

happstack-server 6.0.1 → 6.0.2

raw patch · 3 files changed

+11/−6 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Happstack.Server.Internal.Types: chunked :: Response -> Response
+ Happstack.Server.Internal.Types: contentLength :: Response -> Response
+ Happstack.Server.Types: chunked :: Response -> Response
+ Happstack.Server.Types: contentLength :: Response -> Response

Files

happstack-server.cabal view
@@ -1,5 +1,5 @@ Name:                happstack-server-Version:             6.0.1+Version:             6.0.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
src/Happstack/Server/Internal/Types.hs view
@@ -12,7 +12,7 @@      Conf(..), nullConf, result, resultBS,      redirect, -- redirect_, redirect', redirect'_,      isHTTP1_0, isHTTP1_1,-     RsFlags(..), nullRsFlags, noContentLength,+     RsFlags(..), nullRsFlags, contentLength, chunked, noContentLength,      HttpVersion(..), Length(..), Method(..), Headers, continueHTTP,      Host, ContentType(..)     ) where@@ -60,8 +60,8 @@ -- | isHTTP1_0 && hasKeepAlive || isHTTP1_1 && hasNotConnectionClose continueHTTP :: Request -> Response -> Bool --continueHTTP rq res = isHTTP1_1 rq && getHeader' connectionC rq /= Just closeC && rsfContentLength (rsFlags res)-continueHTTP rq res = (isHTTP1_0 rq && checkHeaderBS connectionC keepaliveC rq) ||-                      (isHTTP1_1 rq && not (checkHeaderBS connectionC closeC rq)) && (rsfLength (rsFlags res) /= NoContentLength)+continueHTTP rq res = (isHTTP1_0 rq && checkHeaderBS connectionC keepaliveC rq   && rsfLength (rsFlags res) == ContentLength) ||+                      (isHTTP1_1 rq && not (checkHeaderBS connectionC closeC rq) && rsfLength (rsFlags res) /= NoContentLength)  -- | HTTP configuration data Conf = Conf { port       :: Int -- ^ Port for the server to listen on.@@ -117,7 +117,7 @@     { rsfLength :: Length     } deriving (Show,Read,Typeable) --- | Default RsFlags that will include the content-length header+-- | Default RsFlags: automatically use @Transfer-Encoding: Chunked@. nullRsFlags :: RsFlags nullRsFlags = RsFlags { rsfLength = TransferEncodingChunked } @@ -128,6 +128,11 @@ -- | Do not automatically add a Content-Length header. Do automatically use Transfer-Encoding: Chunked chunked :: Response -> Response chunked res         = res { rsFlags = flags } where flags = (rsFlags res) { rsfLength = TransferEncodingChunked }++-- | Automatically add a Content-Length header. Do not use Transfer-Encoding: Chunked+contentLength :: Response -> Response+contentLength res   = res { rsFlags = flags } where flags = (rsFlags res) { rsfLength = ContentLength }+  -- | a value extract from the @QUERY_STRING@ or 'Request' body --
src/Happstack/Server/Types.hs view
@@ -10,7 +10,7 @@      Conf(..), nullConf, result, resultBS,      redirect, -- redirect_, redirect', redirect'_,      isHTTP1_0, isHTTP1_1,-     RsFlags(..), nullRsFlags, noContentLength,+     RsFlags(..), nullRsFlags, contentLength, chunked, noContentLength,      HttpVersion(..), Length(..), Method(..), Headers, continueHTTP,      Host, ContentType(..)     ) where