mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 11:42:49 -06:00
pgf-http: fix a bug that caused "+" to be treaded as " " in PGF service requests URLs.
This was a bug in my workaround for a bug in the httpd-shed package. It made it impossible to use the glue token "&+" for Turkish input in the minibar, for example.
This commit is contained in:
@@ -36,10 +36,13 @@ cgiReq root (Request method uri hdrs body) = CGIRequest vars inputs body'
|
|||||||
'?':s -> s
|
'?':s -> s
|
||||||
s -> s
|
s -> s
|
||||||
al = maybe "" id $ lookup "Accept-Language" hdrs
|
al = maybe "" id $ lookup "Accept-Language" hdrs
|
||||||
inputs = map input $ queryToArguments qs -- assumes method=="GET"
|
inputs = map input $ queryToArguments $ fixplus qs -- assumes method=="GET"
|
||||||
body' = BS.pack body
|
body' = BS.pack body
|
||||||
|
|
||||||
input (name,val) = (name,Input (BS.pack (map decode val)) Nothing plaintext)
|
input (name,val) = (name,Input (BS.pack val) Nothing plaintext)
|
||||||
plaintext = ContentType "text" "plain" []
|
plaintext = ContentType "text" "plain" []
|
||||||
decode '+' = ' ' -- httpd-shed bug workaround
|
|
||||||
decode c = c
|
fixplus = concatMap decode
|
||||||
|
where
|
||||||
|
decode '+' = "%20" -- httpd-shed bug workaround
|
||||||
|
decode c = [c]
|
||||||
|
|||||||
Reference in New Issue
Block a user