Revert 33ee15d56f.
Revert to the older faster toChar. I would have just removed the old commit from history but it seems that would call for a rebase which I hear is a bad idea in a public branch. Thus this commit.
This commit is contained in:
parent
f23ca419e9
commit
4d1ea8520a
@ -75,7 +75,10 @@ parseWaiRequest' env session' key' gen = Request gets'' cookies' env langs' nonc
|
|||||||
randomString :: RandomGen g => Int -> g -> String
|
randomString :: RandomGen g => Int -> g -> String
|
||||||
randomString len = take len . map toChar . randomRs (0, 61)
|
randomString len = take len . map toChar . randomRs (0, 61)
|
||||||
where
|
where
|
||||||
toChar i = (['A'..'Z'] ++ ['a'..'z'] ++ ['0'..'9']) !! i
|
toChar i
|
||||||
|
| i < 26 = toEnum $ i + fromEnum 'A'
|
||||||
|
| i < 52 = toEnum $ i + fromEnum 'a' - 26
|
||||||
|
| otherwise = toEnum $ i + fromEnum '0' - 52
|
||||||
|
|
||||||
-- | A tuple containing both the POST parameters and submitted files.
|
-- | A tuple containing both the POST parameters and submitted files.
|
||||||
type RequestBodyContents =
|
type RequestBodyContents =
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user