Use comma rather than semicolon to split header values (#698)
This commit is contained in:
@@ -176,7 +176,7 @@ userApiRequest schema req reqBody =
|
||||
hasPrefer val = any (\(h,v) -> h == "Prefer" && val `elem` split v) hdrs
|
||||
where
|
||||
split :: BS.ByteString -> [Text]
|
||||
split = map T.strip . T.split (==';') . toS
|
||||
split = map T.strip . T.split (==',') . toS
|
||||
singular = hasPrefer "plurality=singular"
|
||||
representation
|
||||
| hasPrefer "return=representation" = Full
|
||||
|
||||
@@ -164,7 +164,7 @@ makeGetParams cs =
|
||||
|
||||
makePostParams :: Text -> [Param]
|
||||
makePostParams tn =
|
||||
[ makePreferParam ["return=representation", "return=representation;plurality=singular",
|
||||
[ makePreferParam ["return=representation", "return=representation,plurality=singular",
|
||||
"return=minimal", "return=none"]
|
||||
, (mempty :: Param)
|
||||
& name .~ "body"
|
||||
|
||||
Reference in New Issue
Block a user