Hi,
I'm in the process of doing a migration but I am having some problems
and I'm not sure how to approach this.
I debugged quite far into the Resteasy JAX-RS integration and also
looked at past commits to ServerResponseWriter which is AFAICS the
source of the problem. I identified the following two commits related to
https://issues.redhat.com/browse/RESTEASY-1227 which might be the reason
for my issue:
*
https://github.com/resteasy/Resteasy/commit/992f605197c52030e88a21145e6ec...
*
https://github.com/resteasy/Resteasy/commit/fb33d3c1bac91bdb1d686008bb679...
The problem I have, is that when a HEAD request is made, which doesn't
have an Accept header, Resteasy can't figure out how to encode the
result object from my resource method. Previously, Resteasy tried to
find a MessageBodyWriter, which it now does not anymore, as it instead
throws a NotAcceptableException. As per the comment in the code, this
seems to be due to JAX-RS 2.0 section 3.8.6.
It seems that the MessageBodyWriter resolving only occurs when there is
an Accept header, which is ok if section 3.8.4 were properly respected.
It states that "If A = {}, set A {'*/*'}", which AFAICS is exactly what
is missing here. If '*/*' were added to A(note that "chosen" is set to
that value in the code), the MessageBodyWriter resolving would AFAIK
work correctly again for my case.
Is this a regression or did I misread the specification?
Regards,
Christian