Drop ? in query string (fixes #590)

This commit is contained in:
Michael Snoyman 2016-11-20 17:19:09 +02:00
parent 52951ead80
commit ec3ddf7007
3 changed files with 9 additions and 2 deletions

View File

@ -1,3 +1,7 @@
## 3.0.0.3
* wai-frontend-monadcgi does not drop '?' in query string [#590](https://github.com/yesodweb/wai/issues/590)
## 3.0.0.2
* Support for wai 3.2

View File

@ -64,5 +64,8 @@ getCgiVars :: Request -> [(String, String)]
getCgiVars e =
[ ("PATH_INFO", S8.unpack $ rawPathInfo e)
, ("REQUEST_METHOD", show $ requestMethod e)
, ("QUERY_STRING", S8.unpack $ rawQueryString e)
, ("QUERY_STRING",
case S8.unpack $ rawQueryString e of
'?':rest -> rest
x -> x)
]

View File

@ -1,5 +1,5 @@
name: wai-frontend-monadcgi
version: 3.0.0.2
version: 3.0.0.3
license: MIT
license-file: LICENSE
author: Michael Snoyman <michael@snoyman.com>