jersey
  1. jersey
  2. JERSEY-1909

JAX-RSResponse.status(404) is overwritten by WebContainer

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: 2.1
    • Component/s: containers
    • Labels:
      None

      Description

      A placeholder for GLASSFISH-20591 in Jersey project Jira.

        Issue Links

          Activity

          Hide
          Miroslav Fuksa added a comment -

          I am closing the issue as "won't fix" as it is an edge case. When 404 is returned with no entity and media type is specified then expecting such a media type even no entity is in the response is the edge case. The media type (content type) is bound to the entity. The fact that we Web Container returns the HTML page is also ok as 404 is the error code and not a success response.

          I have added tests when an entity is defined in the response for 404. In this case the container does not return standard HTML page but it returns the entity and media type is preserved.

          Set the entity in the response a workaround.

          Show
          Miroslav Fuksa added a comment - I am closing the issue as "won't fix" as it is an edge case. When 404 is returned with no entity and media type is specified then expecting such a media type even no entity is in the response is the edge case. The media type (content type) is bound to the entity. The fact that we Web Container returns the HTML page is also ok as 404 is the error code and not a success response. I have added tests when an entity is defined in the response for 404. In this case the container does not return standard HTML page but it returns the entity and media type is preserved. Set the entity in the response a workaround.

            People

            • Assignee:
              Miroslav Fuksa
              Reporter:
              Marek Potociar
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 3 hours Original Estimate - 3 hours
                3h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours
                5h