packages feed

wai 0.3.0 → 0.3.1

raw patch · 2 files changed

+41/−28 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

+ Network.Wai: status201 :: Status
+ Network.Wai: statusBadRequest :: Status
+ Network.Wai: statusCreated :: Status
+ Network.Wai: statusForbidden :: Status
+ Network.Wai: statusFound :: Status
+ Network.Wai: statusMovedPermanently :: Status
+ Network.Wai: statusNotAllowed :: Status
+ Network.Wai: statusNotFound :: Status
+ Network.Wai: statusOK :: Status
+ Network.Wai: statusSeeOther :: Status
+ Network.Wai: statusServerError :: Status
+ Network.Wai: statusUnauthorized :: Status

Files

Network/Wai.hs view
@@ -7,13 +7,10 @@ protocol between web servers and web applications.  The overriding design principles here are performance and generality . To-address performance, this library is built on 'Source' for the request body and-'Enumerator' for the response bodies. The advantages of this approach over lazy-IO have been debated elsewhere.--Nonetheless, many people find these data structures difficult to work with. For-that reason, this library includes the "Network.Wai.Enumerator" module to-provide more familiar abstractions, including lazy IO.+address performance, this library is built on top of the enumerator package.+The advantages of this approach over lazy IO have been debated elsewhere.+However, helper functions like 'responseLBS' allow you to continue using lazy+IO if you so desire.  Generality is achieved by removing many variables commonly found in similar projects that are not universal to all servers. The goal is that the 'Request'@@ -49,16 +46,17 @@     , ResponseHeaders       -- ** Response status code     , Status (..)-    , status200-    , status301-    , status302-    , status303-    , status400-    , status401-    , status403-    , status404-    , status405-    , status500+    , status200, statusOK+    , status201, statusCreated+    , status301, statusMovedPermanently+    , status302, statusFound+    , status303, statusSeeOther+    , status400, statusBadRequest+    , status401, statusUnauthorized+    , status403, statusForbidden+    , status404, statusNotFound+    , status405, statusNotAllowed+    , status500, statusServerError       -- * WAI interface     , Request (..)     , Response (..)@@ -153,44 +151,59 @@     x == y = statusCode x == statusCode y  -- | OK-status200 :: Status+status200, statusOK :: Status status200 = Status 200 $ B8.pack "OK"+statusOK = status200 +-- | Created+status201, statusCreated :: Status+status201 = Status 200 $ B8.pack "Created"+statusCreated = status201+ -- | Moved Permanently-status301 :: Status+status301, statusMovedPermanently :: Status status301 = Status 301 $ B8.pack "Moved Permanently"+statusMovedPermanently = status301  -- | Found-status302 :: Status+status302, statusFound :: Status status302 = Status 302 $ B8.pack "Found"+statusFound = status302  -- | See Other-status303 :: Status+status303, statusSeeOther :: Status status303 = Status 303 $ B8.pack "See Other"+statusSeeOther = status303  -- | Bad Request-status400 :: Status+status400, statusBadRequest :: Status status400 = Status 400 $ B8.pack "Bad Request"+statusBadRequest = status400  -- | Unauthorized-status401 :: Status+status401, statusUnauthorized :: Status status401 = Status 401 $ B8.pack "Unauthorized"+statusUnauthorized = status401  -- | Forbidden-status403 :: Status+status403, statusForbidden :: Status status403 = Status 403 $ B8.pack "Forbidden"+statusForbidden = status403  -- | Not Found-status404 :: Status+status404, statusNotFound :: Status status404 = Status 404 $ B8.pack "Not Found"+statusNotFound = status404  -- | Method Not Allowed-status405 :: Status+status405, statusNotAllowed :: Status status405 = Status 405 $ B8.pack "Method Not Allowed"+statusNotAllowed = status405  -- | Internal Server Error-status500 :: Status+status500, statusServerError :: Status status500 = Status 500 $ B8.pack "Internal Server Error"+statusServerError = status500  -- | Information on the request sent by the client. This abstracts away the -- details of the underlying implementation.
wai.cabal view
@@ -1,5 +1,5 @@ Name:                wai-Version:             0.3.0+Version:             0.3.1 Synopsis:            Web Application Interface. Description:         Provides a common protocol for communication between web aplications and web servers. License:             BSD3