Sling
  1. Sling
  2. SLING-1501

JSONResponse doesn't set the status code on the response

    Details

      Description

      When we are doing POST operations we use the Accept header set to application/json so we get a json response back.
      However, when an operation fails for some reason, there is no status code set on the response. (It is defined in the json response itself though).
      This patch should set a status code.

      1. jsonresponse.patch
        4 kB
        Simon Gaeremynck

        Activity

        Gavin made changes -
        Workflow re-open possible,doc-test-required [ 12788963 ] no-reopen-closed,doc-test-required [ 12791429 ]
        Gavin made changes -
        Workflow no-reopen-closed,doc-test-required [ 12765793 ] re-open possible,doc-test-required [ 12788963 ]
        Gavin made changes -
        Workflow Copy of no-reopen-closed,doc-test-required [ 12763929 ] no-reopen-closed,doc-test-required [ 12765793 ]
        Gavin made changes -
        Workflow no-reopen-closed,doc-test-required [ 12509300 ] Copy of no-reopen-closed,doc-test-required [ 12763929 ]
        Vidar S. Ramdal made changes -
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Vidar S. Ramdal [ vramdal ]
        Resolution Fixed [ 1 ]
        Hide
        Vidar S. Ramdal added a comment -

        Thank you for the patch! I have applied it in rev #937970.

        Show
        Vidar S. Ramdal added a comment - Thank you for the patch! I have applied it in rev #937970.
        Simon Gaeremynck made changes -
        Field Original Value New Value
        Attachment jsonresponse.patch [ 12442790 ]
        Hide
        Simon Gaeremynck added a comment -

        Sets the status in JSONresponse
        Adds in a test case to check for a proper statuscode

        Show
        Simon Gaeremynck added a comment - Sets the status in JSONresponse Adds in a test case to check for a proper statuscode
        Simon Gaeremynck created issue -

          People

          • Assignee:
            Vidar S. Ramdal
            Reporter:
            Simon Gaeremynck
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development