packages feed

wai 3.2.0.1 → 3.2.1

raw patch · 3 files changed

+13/−1 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Network.Wai: mapResponseStatus :: (Status -> Status) -> Response -> Response

Files

ChangeLog.md view
@@ -1,3 +1,7 @@+## 3.2.1++* add mapResponseStatus [#532](https://github.com/yesodweb/wai/pull/532)+ ## 3.2.0.1  * Add missing changelog entry
Network/Wai.hs view
@@ -79,6 +79,7 @@       -- ** Response modifiers     , responseToStream     , mapResponseHeaders+    , mapResponseStatus       -- * Middleware composition     , ifRequest     , modifyResponse@@ -238,6 +239,13 @@ mapResponseHeaders f (ResponseBuilder s h b) = ResponseBuilder s (f h) b mapResponseHeaders f (ResponseStream s h b) = ResponseStream s (f h) b mapResponseHeaders _ r@(ResponseRaw _ _) = r++-- | Apply the provided function to the response status of the Response.+mapResponseStatus :: (H.Status -> H.Status) -> Response -> Response+mapResponseStatus f (ResponseFile s h b1 b2) = ResponseFile (f s) h b1 b2+mapResponseStatus f (ResponseBuilder s h b) = ResponseBuilder (f s) h b+mapResponseStatus f (ResponseStream s h b) = ResponseStream (f s) h b+mapResponseStatus _ r@(ResponseRaw _ _) = r  ---------------------------------------------------------------- 
wai.cabal view
@@ -1,5 +1,5 @@ Name:                wai-Version:             3.2.0.1+Version:             3.2.1 Synopsis:            Web Application Interface. Description:         Provides a common protocol for communication between web applications and web servers. description:         API docs and the README are available at <http://www.stackage.org/package/wai>.