You actually return "UTF-8" (in quotation) and not UTF-8. I'm not sure if this is valid according to the HTTP spec.
Content-Type: text/plain; charset=UTF-8without quotes. I haven't figured out yet how to make Resteasy to not add them. When I don't set the encoding at all, i. e. I change the annotation in MyResource.java from If Resteasy add quotations then perhaps it's valid? In that case I should fix that in RA but I'm not sure if it's correct. Reading https://bugzilla.mozilla.org/show_bug.cgi?id=700589 I interpret it that it's not allowed to use quotations around the charset, what do you think?
14.17 Content-Type [...]Content-Type = "Content-Type" ":" media-type
Media types are defined in section 3.7. An example of the field is
Content-Type: text/html; charset=ISO-8859-4media-type = type "/" subtype *( ";" parameter )
From 3.6:
Parameters are in the form of attribute/value pairs. parameter = attribute "=" value
In 3.4 Character Sets:
[...] HTTP character sets are identified by case-insensitive tokens. The complete set of tokens is defined by the IANA Character Set registry [19]. charset = token
4.1.2. Charset Parameter A critical parameter that may be specified in the Content-Type field for "text/plain" data is the character set. This is specified with a "charset" parameter, as in: Content-type: text/plain; charset=iso-8859-1 Again, no quotes. Well, I'm no expert but I'd say RestEasy is wrong and there's nothing to fix in RA. :-)
--
You received this message because you are subscribed to the Google Groups "REST assured" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rest-assured...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.