Another fix for UTF8 paths
This commit is contained in:
parent
68c02c3289
commit
8c183d9cda
@ -504,7 +504,7 @@ setUrl url' = do
|
||||
let (urlPath, urlQuery) = T.break (== '?') url
|
||||
ST.modify $ \rbd -> rbd
|
||||
{ rbdPath =
|
||||
case DL.filter (/="") $ T.split (== '/') urlPath of
|
||||
case DL.filter (/="") $ H.decodePathSegments $ TE.encodeUtf8 urlPath of
|
||||
("http:":_:rest) -> rest
|
||||
("https:":_:rest) -> rest
|
||||
x -> x
|
||||
|
||||
@ -113,6 +113,11 @@ main = hspec $ do
|
||||
get ("/dynamic1/שלום" :: Text)
|
||||
statusIs 200
|
||||
bodyEquals "שלום"
|
||||
yit "from path, type-safe URL" $ do
|
||||
get $ LiteAppRoute ["dynamic1", "שלום"]
|
||||
statusIs 200
|
||||
printBody
|
||||
bodyEquals "שלום"
|
||||
yit "from WAI" $ do
|
||||
get ("/dynamic2/שלום" :: Text)
|
||||
statusIs 200
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
name: yesod-test
|
||||
version: 1.2.1.3
|
||||
version: 1.2.1.4
|
||||
license: MIT
|
||||
license-file: LICENSE
|
||||
author: Nubis <nubis@woobiz.com.ar>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user