mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-23 19:42:50 -06:00
gf -server: fix bug that caused '+' to be converted to ' ' in uploaded grammars
Fixed buggy workaround for bug in httpd-shed function queryToArguments.
This commit is contained in:
@@ -90,10 +90,9 @@ handle_fcgi execute1 state0 stateM cache =
|
|||||||
-- | HTTP request handler
|
-- | HTTP request handler
|
||||||
handle state0 cache execute1
|
handle state0 cache execute1
|
||||||
rq@(Request method URI{uriPath=upath,uriQuery=q} hdrs body) state =
|
rq@(Request method URI{uriPath=upath,uriQuery=q} hdrs body) state =
|
||||||
do let qs = decodeQ $
|
do let qs = case method of
|
||||||
case method of
|
"GET" -> inputs q
|
||||||
"GET" -> queryToArguments q
|
"POST" -> inputs body
|
||||||
"POST" -> queryToArguments body
|
|
||||||
|
|
||||||
logPutStrLn $ method++" "++upath++" "++show qs
|
logPutStrLn $ method++" "++upath++" "++show qs
|
||||||
case upath of
|
case upath of
|
||||||
@@ -338,9 +337,11 @@ toHeader s = FCGI.HttpExtensionHeader s -- cheating a bit
|
|||||||
-}
|
-}
|
||||||
-- * misc utils
|
-- * misc utils
|
||||||
|
|
||||||
decodeQ qs = [(decode n,decode v)|(n,v)<-qs]
|
|
||||||
decode = map decode1
|
inputs = queryToArguments . fixplus
|
||||||
decode1 '+' = ' ' -- httpd-shed bug workaround
|
where
|
||||||
decode1 c = c
|
fixplus = concatMap decode
|
||||||
|
decode '+' = "%20" -- httpd-shed bug workaround
|
||||||
|
decode c = [c]
|
||||||
|
|
||||||
mapFst f xys = [(f x,y)|(x,y)<-xys]
|
mapFst f xys = [(f x,y)|(x,y)<-xys]
|
||||||
Reference in New Issue
Block a user