tests pass, except clean path
This commit is contained in:
parent
c499e880b6
commit
03da3b021a
@ -43,6 +43,8 @@ import Data.ByteString.Lazy.Char8 ()
|
||||
import Web.ClientSession
|
||||
import Data.Char (isUpper)
|
||||
import Data.Text (Text)
|
||||
import Data.Text.Encoding (decodeUtf8With)
|
||||
import Data.Text.Encoding.Error (lenientDecode)
|
||||
import Data.Monoid (mappend)
|
||||
import qualified Data.ByteString as S
|
||||
import qualified Blaze.ByteString.Builder
|
||||
@ -170,8 +172,8 @@ toWaiApp' y key' env =
|
||||
yesodDispatch y y id app404 handler405 method (W.pathInfo env) key' env
|
||||
where
|
||||
app404 = yesodRunner notFound y y Nothing id
|
||||
handler405 = error "handler405"
|
||||
method = error "method"
|
||||
handler405 route = yesodRunner badMethod y y (Just route) id
|
||||
method = decodeUtf8With lenientDecode $ W.requestMethod env
|
||||
|
||||
sendRedirect :: Yesod master => master -> [Text] -> W.Application
|
||||
sendRedirect y segments' env =
|
||||
|
||||
@ -600,7 +600,7 @@ notFound :: GHandler sub master a
|
||||
notFound = hcError NotFound
|
||||
|
||||
-- | Return a 405 method not supported page.
|
||||
badMethod :: GHandler s m a
|
||||
badMethod :: GHandler sub master a
|
||||
badMethod = do
|
||||
w <- waiRequest
|
||||
hcError $ BadMethod $ W.requestMethod w
|
||||
|
||||
Loading…
Reference in New Issue
Block a user