Uploaded image for project: 'JBoss Enterprise Application Platform'
  1. JBoss Enterprise Application Platform
  2. JBEAP-24506

[GSS](7.4.z) RESTEASY-3283 - Do not throw an exception for OPTIONS request

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • Major
    • 7.4.10.CR1, 7.4.10.GA
    • 7.4.9.GA
    • REST
    • None

    Description

      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:

      1. Call a method annotated with a request method designator for OPTIONS or, if none present,
      2. Generate an automatic response using the metadata provided by the JAX-RS annotations on the matching class and its methods.

      Attachments

        Issue Links

          Activity

            People

              jperkins-rhn James Perkins
              rhn-support-aogburn Aaron Ogburn
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: