mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-24 03:52:50 -06:00
pgf-server HTTP mode: workaround for bugs in the httpd-shed package that prevented the fridge and translate web apps from working
queryToArguments "?&input=bla+bla"
returns [("&input","bla+bla")]
but should return [("input","bla bla")]
This commit is contained in:
@@ -31,11 +31,13 @@ cgiReq (Request method uri hdrs body) = CGIRequest vars inputs body'
|
|||||||
("SCRIPT_FILENAME",documentRoot++uriPath uri),
|
("SCRIPT_FILENAME",documentRoot++uriPath uri),
|
||||||
("QUERY_STRING",qs)]
|
("QUERY_STRING",qs)]
|
||||||
qs = case uriQuery uri of
|
qs = case uriQuery uri of
|
||||||
|
'?':'&':s -> s -- httpd-shed bug workaround
|
||||||
'?':s -> s
|
'?':s -> s
|
||||||
s -> s
|
s -> s
|
||||||
inputs = map input $ queryToArguments qs -- assumes method=="GET"
|
inputs = map input $ queryToArguments qs -- assumes method=="GET"
|
||||||
body' = BS.pack body
|
body' = BS.pack body
|
||||||
|
|
||||||
input (name,val) = (name,Input (BS.pack val) Nothing plaintext)
|
input (name,val) = (name,Input (BS.pack (map decode val)) Nothing plaintext)
|
||||||
plaintext = ContentType "plain" "text" []
|
plaintext = ContentType "text" "plain" []
|
||||||
|
decode '+' = ' ' -- httpd-shed bug workaround
|
||||||
|
decode c = c
|
||||||
|
|||||||
Reference in New Issue
Block a user