@@ -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