From 327401eee4c866730087822c4c4fd46d5742bba2 Mon Sep 17 00:00:00 2001 From: Michael Snoyman Date: Sun, 30 Jan 2011 21:52:42 +0200 Subject: [PATCH] Fixed a ByteString/String mismatch --- Yesod/Internal/Dispatch.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Yesod/Internal/Dispatch.hs b/Yesod/Internal/Dispatch.hs index 3b52352e..faf687f8 100644 --- a/Yesod/Internal/Dispatch.hs +++ b/Yesod/Internal/Dispatch.hs @@ -16,6 +16,7 @@ import qualified Network.Wai as W import Yesod.Core (yesodRunner, yesodDispatch) import Data.List (foldl') import Data.Char (toLower) +import qualified Data.ByteString.Char8 as S8 {-| @@ -106,7 +107,7 @@ mkSimpleExp segments [] frontVars (master, sub, toMasterRoute, mkey, constr, met onSuccess <- newName "onSuccess" req <- newName "req" badMethod' <- [|badMethod|] - rm <- [|W.requestMethod|] + rm <- [|S8.unpack . W.requestMethod|] let caseExp = rm `AppE` VarE req yr <- [|yesodRunner|] cr <- [|fmap chooseRep|]