jersey
  1. jersey
  2. JERSEY-1298

Response#getMediaType returns null

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Works as designed
    • Affects Version/s: 2.0-m06
    • Fix Version/s: 2.0-m06, 2.0
    • Component/s: core
    • Labels:
      None

      Description

      		Entity<String> entity = Entity.entity("entity",
      				MediaType.APPLICATION_ATOM_XML);
      		Response response = Response.ok(entity).build();
      		MediaType responseMedia = response.getMediaType();
      

      responseMedia is null

        Activity

        Hide
        Martin Matula added a comment -

        According to the spec, is this supposed to work?

        Show
        Martin Matula added a comment - According to the spec, is this supposed to work?
        Hide
        Marek Potociar added a comment -

        No, this use case is not covered. The question is whether is should work... Thoughts?

        Show
        Marek Potociar added a comment - No, this use case is not covered. The question is whether is should work... Thoughts?
        Hide
        Marek Potociar added a comment -

        Given the fact that Entity is from the client API and ResponseBuilder is used almost exclusively on the server-side I am closing the issue without any further action as "works as designed".

        Please feel free to reopen if you disagree for any reason.

        Show
        Marek Potociar added a comment - Given the fact that Entity is from the client API and ResponseBuilder is used almost exclusively on the server-side I am closing the issue without any further action as "works as designed". Please feel free to reopen if you disagree for any reason.

          People

          • Assignee:
            Marek Potociar
            Reporter:
            jan.supol
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: