Wicket
  1. Wicket
  2. WICKET-4900

Setting a status code on an AbstractResource results in no HTTP body

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 6.2.0
    • Fix Version/s: 6.4.0, 1.5.10
    • Component/s: None
    • Labels:
      None

      Description

      When implementing an AbstractResource, if ResourceResponse#setStatusCode is called, the HTTP body of the response comes back empty. I'm pretty sure this is due to the following check in AbstractResource#respond:

      if (!data.dataNeedsToBeWritten(attributes) || data.getErrorCode() != null || data.getStatusCode() != null)

      { return; }

      There are many HTTP status codes that are not errors that might warrant an HTTP body.

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        2d 18h 21m 1 Martin Grigorov 03/Dec/12 10:21
        Martin Grigorov made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Assignee Martin Grigorov [ mgrigorov ]
        Fix Version/s 6.4.0 [ 12323450 ]
        Fix Version/s 1.5.10 [ 12323510 ]
        Resolution Fixed [ 1 ]
        Ben Heiskell created issue -

          People

          • Assignee:
            Martin Grigorov
            Reporter:
            Ben Heiskell
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development