on master help sign in
Merge branch 'master' of github.com:yesodweb/wai
commit671720ec8e5ed03b7aa89b9e6495ce1ef3807a3c authorMichael Snoyman <michael@snoyman.com> dateMon 24 Jun 2013, 08:33 (13 years ago) parentfffd5f44c51784
2 files changed+7−3
wai-test/Network/Wai/Test.hs+6−2 wai-test/wai-test.cabal+1−1
wai-test/Network/Wai/Test.hs+6−2
@@ -102,8 +102,12 @@ setPath req path = req {
102102
103103setRawPathInfo :: Request -> S8.ByteString -> Request
104104setRawPathInfo r rawPinfo =
105− let pInfo = T.split (== '/') $ TE.decodeUtf8 rawPinfo
106− in r { rawPathInfo = rawPinfo, pathInfo = pInfo }
105+ let pInfo = dropFrontSlash $ T.split (== '/') $ TE.decodeUtf8 rawPinfo
106+ in r { rawPathInfo = rawPinfo, pathInfo = pInfo }
107+ where
108+ dropFrontSlash ("":"":[]) = [] -- homepage, a single slash
109+ dropFrontSlash ("":path) = path
110+ dropFrontSlash path = path
107111
108112srequest :: SRequest -> Session SResponse
109113srequest (SRequest req bod) = do
wai-test/wai-test.cabal+1−1
@@ -1,5 +1,5 @@
11name: wai-test
2−version: 1.3.1
2+version: 1.3.1.1
33license: MIT
44license-file: LICENSE
55author: Michael Snoyman <michael@snoyman.com>