For correctness include charset=utf-8 in responses

This commit is contained in:
Joe Nelson
2016-03-13 14:22:17 -07:00
parent 330cc91645
commit b858626e17
5 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -41,8 +41,8 @@ data PreferRepresentation = Full | HeadersOnly | None deriving Eq
-- route responses and upload payloads
data ContentType = ApplicationJSON | TextCSV deriving Eq
instance Show ContentType where
show ApplicationJSON = "application/json"
show TextCSV = "text/csv"
show ApplicationJSON = "application/json; charset=utf-8"
show TextCSV = "text/csv; charset=utf-8"
{-|
Describes what the user wants to do. This data type is a
+1 -1
View File
@@ -249,7 +249,7 @@ contentRangeH frm to total =
fromInRange = frm <= to
jsonH :: Header
jsonH = (hContentType, "application/json")
jsonH = (hContentType, "application/json; charset=utf-8")
formatRelationError :: Text -> Text
formatRelationError = formatGeneralError