In Teiid, one of the entities it defines is declared with annotation
@Produces(application/xml;charset=utf-8), and when client issues query
against this like

curl -H "Accept:application/xml" http://localhost:8080/foo

it fails with exception, "No match for accept header", which I see as it
fails to match the parameter on MediaType in RestEasy engine, thus
fails. While doing some analysis, whether this should be allowed, I saw
from XML specification http://www.w3.org/TR/REC-xml/#charencoding

In the absence of information provided by an external transport protocol
(e.g. HTTP or MIME), it is a fatal error for an entity including an
encoding declaration to be presented to the XML processor in an encoding
other than that named in the declaration, or for an entity which begins
with neither a Byte Order Mark nor an encoding declaration to use an
encoding other than UTF-8. Note that since ASCII is a subset of UTF-8,
ordinary ASCII entities do not strictly need an encoding declaration.

which leads me to believe that RestEasy may be being too strict about
the matching content type fully and not allowing the default "utf-8"

Teiid community thread is here https://community.jboss.org/message/799953

Can you share your thoughts on this subject, as to it should be allowed
in RestEasy or client needs to be specific?



Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
Resteasy-users mailing list

Reply via email to