Fix charset=utf-8 appending to binary output

This commit is contained in:
steve-chavez
2020-10-29 18:53:24 -05:00
committed by Steve Chavez
parent a6696f3ba1
commit 2798ced9b9
6 changed files with 16 additions and 8 deletions
+1 -1
View File
@@ -201,7 +201,7 @@ userApiRequest confSchemas rootSpec dbStructure req reqBody
(CTTextCSV, _) -> do
json <- csvToJson <$> CSV.decodeByName reqBody
note "All lines must have same number of fields" $ payloadAttributes (JSON.encode json) json
(CTOther "application/x-www-form-urlencoded", _) ->
(CTUrlEncoded, _) ->
let json = paramsFromList . map (toS *** toS) . parseSimpleQuery $ toS reqBody
keys = S.fromList $ M.keys json in
Right $ ProcessedJSON (JSON.encode json) keys