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

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development