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

No header checks

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment Visibility
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: 8.0.5
    • Fix Version/s: None
    • Component/s: TomEE Core Server
    • Labels:
      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

            • Assignee:
              Unassigned
              Reporter:
              fcourtau François Courtault

              Dates

              • Created:
                Updated:

                Issue deployment