On 14.05.2015 03:38, Ron Sigal wrote: > Very interesting. Honestly, I'm not sure how to think about this. The > JAX-RS 1.1 spec says "An implementation MUST NOT invoke a method whose > effective value of @Produces does not match the request Accept header.", > but I don't see where it ever actually defines "match". And Resteasy > passes the TCK tests. Really, I'm not even sure what "match" SHOULD > mean. We could get crazy and do full blown unification > (http://en.wikipedia.org/wiki/Unification_%28computer_science%29). Ugh. > > Resource matching is a very fundamental notion in JAX-RS, and I wouldn't > want to make any changes without being very careful. > > Any thoughts about how to interpret "match"?
Certainly the decisive answer would be: in the same way as HTTP spec does. But unfortunately, I can't find relevant spec part that explicitly says that content type of 'type/subtype;key=value' matches Accept header of 'type/subtype'. The examples in [1] suggests so, as does the practice of browser 'Accept' header. So, in my opinion, the @Produces("text/plain;charset=utf-8") should be considered as matching the relevant client's request.accept("text/plain"); Przemek ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ Resteasy-users mailing list Resteasy-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/resteasy-users