Use comma rather than semicolon to split header values (#698)

This commit is contained in:
Joe Nelson
2016-08-21 15:26:00 -07:00
committed by GitHub
parent 6f737056a2
commit 7278507c42
5 changed files with 8 additions and 7 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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"