Uploaded image for project: 'TomEE'
  1. TomEE
  2. TOMEE-2940

No header checks

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Critical
    • Resolution: Unresolved
    • 8.0.5
    • None
    • TomEE Core Server
    • None

    Description

      Hello,

      Let's say that I have a method  in a REST resouce file, with the following annotations:

      @POST
      @Consumes({"application/json"})
      @Produces({"application/json"})

      Response myMethod(final MyRequest myRequest) { ....}

      If  use curl to target this method with the following header,I got the following responses:

      • -H 'Content-Type: application/-' : HTTP 415 error
      • -H 'Content-Type: -' : no HTTP error, expected to get the same error than above
      • -H 'Content-Type: -' and 'Content-Length: 0' with a payload length > 0: no error except if we call myRequest.doSomthing() => NPE****

      Don't think it's a good behavior, right ?

      Best Regards.

      Attachments

        Activity

          People

            Unassigned Unassigned
            fcourtau François Courtault
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: