packages feed

wai-extra 1.2.0.2 → 1.2.0.3

raw patch · 2 files changed

+10/−4 lines, 2 filesdep ~fast-loggerPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: fast-logger

API changes (from Hackage documentation)

Files

Network/Wai/Middleware/MethodOverride.hs view
@@ -6,11 +6,17 @@ import Network.Wai import Control.Monad (join) +-- | Allows overriding of the HTTP request method via the _method query string+-- parameter.+--+-- This middlware only applies when the initial request method is POST. This+-- allow submitting of normal HTML forms, without worries of semantics+-- mismatches in the HTTP spec. methodOverride :: Middleware methodOverride app req =     app req'   where     req' =-        case join $ lookup "_method" $ queryString req of-            Nothing -> req-            Just m -> req { requestMethod = m }+        case (requestMethod req, join $ lookup "_method" $ queryString req) of+            ("POST", Just m) -> req { requestMethod = m }+            _ -> req
wai-extra.cabal view
@@ -1,5 +1,5 @@ Name:                wai-extra-Version:             1.2.0.2+Version:             1.2.0.3 Synopsis:            Provides some basic WAI handlers and middleware. Description:         The goal here is to provide common features without many dependencies. License:             MIT