on master help sign in
bug in CGI inputs, need to use all vars earlier.
bd3c2f3dbpatterson
Hack/Frontend/MonadCGI.hs+3−4
@@ -19,13 +19,12 @@ safeRead d s = case reads s of
19
19
20cgiToApp :: CGI CGIResult -> Application
20cgiToApp :: CGI CGIResult -> Application
21cgiToApp cgi env = do
21cgiToApp cgi env = do
22− let vars = http env
22+ let vars = map (first fixVarName) (http env)++ getCgiVars env
23 input = hackInput env
23 input = hackInput env
24 (inputs, body') = decodeInput vars input
24 (inputs, body') = decodeInput vars input
25 req = CGIRequest
25 req = CGIRequest
26− { cgiVars = Map.fromList $ map (first fixVarName) vars
26+ { cgiVars = Map.fromList $ vars
27− ++ getCgiVars env
28− , cgiInputs = inputs
27+ , cgiInputs = inputs
29 , cgiRequestBody = body'
28 , cgiRequestBody = body'
30 }
29 }
31 (headers'', output') <- runCGIT cgi req
30 (headers'', output') <- runCGIT cgi req