-
Task
-
Resolution: Done
-
Major
-
None
-
None
It seems like RESTEasy has been throwing this exception for a long time. Maybe even since OPTIONS support was added. This seems odd since it would be processed via an ExceptionMapper.
It's even documented as such in the RESTEasy documentation.
Exception HTTP Code Description DefaultOptionsMethodException N/A If the user invokes HTTP OPTIONS and no Jakarta RESTful Web Services method for it, RESTEasy provides a default behavior by throwing this exception
It definitely looks odd to me that by default if a method is not annotated with @OPTIONS then an exception is thrown. I don't see in the spec where it requires an exception to be thrown:
https://jakarta.ee/specifications/restful-ws/3.1/jakarta-restful-ws-spec-3.1.html#head_and_options
On receipt of an OPTIONS request an implementation MUST either:
- Call a method annotated with a request method designator for OPTIONS or, if none present,
- Generate an automatic response using the metadata provided by the JAX-RS annotations on the matching class and its methods.
- causes
-
RESTEASY-3310 RESTEASY-3283 fix causes ClassCastException during SubResource test
- Resolved
- is cloned by
-
JBEAP-24506 [GSS](7.4.z) RESTEASY-3283 - Do not throw an exception for OPTIONS request
- Closed
- is incorporated by
-
WFLY-17638 Upgrade RESTEasy from 6.2.2.Final to 6.2.3.Final
- Closed