jersey
  1. jersey
  2. JERSEY-1533

URL's extension,Content-Type and Accept for http post, the response code from server.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Incomplete
    • Affects Version/s: 1.14
    • Fix Version/s: 1.18
    • Component/s: None
    • Labels:
      None
    • Environment:

      jersey 1.14 with grizzly on linux

      Description

      we are using jersey 1.14 with grizzly on linux for our restful web server.
      when using HTTP post with rest-client, the response is a little strange.

      Line # URL's extension Content-Type Accept Data's Format in Body Response Code
      1 no no no only xml 200 OK
      2 no application/json no only xml 200 OK
      3 xml no no only xml 415 Unsupported Media Type
      4 xml application/json no only json 200 OK

      i am confused that line 1 returns '200 OK' while line 3 returns '415 Unsupported Media Type';
      line 2 can only post data with xml format;
      and line 4 can only post data with json format.

      are there bugs or some other items in http head must be set, waiting for your replay, thank you.

        Activity

        Hide
        eelykcaj added a comment -

        the table list is the same as the one described in bug description.

        Show
        eelykcaj added a comment - the table list is the same as the one described in bug description.
        Hide
        Martin Matula added a comment -

        The extension to media type mapping must be explicitly configured on the resource config. Have you done that? Also, the extension only says what content it accepts, not what code it sends in the entity. I.e. you should always include Content-Type header in requests that contain an entity.

        Show
        Martin Matula added a comment - The extension to media type mapping must be explicitly configured on the resource config. Have you done that? Also, the extension only says what content it accepts, not what code it sends in the entity. I.e. you should always include Content-Type header in requests that contain an entity.
        Hide
        Pavel Bucek added a comment -

        closing as incomplete (reporter did not answer Martins question); anyway, seems like it works as designed.

        Show
        Pavel Bucek added a comment - closing as incomplete (reporter did not answer Martins question); anyway, seems like it works as designed.

          People

          • Assignee:
            Pavel Bucek
            Reporter:
            eelykcaj
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: