Uploaded image for project: 'Struts 2'
  1. Struts 2
  2. WW-4311

HttpHeaderResult should allow to provide a body for the response

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • 7.1.0
    • Dispatch Filter
    • None

    Description

      Curently the HttpHeaderResult can only write to the body response if it is the result has a parameter error (through the errorMessage setter), and then it uses javax.servlet.http.HttpServletResponse#sendError(int, String) to send the error, with the error message in the body, to the client.

      If the result has a parameters status, and no error, then nothing is written to the response body. It only set the status and the headers, and send it to the client.

      I suggest to add a parameter message that can be written to the response when using the parameter status.

      I'm working on a patch for this, it shouldn't take long.

      Attachments

        Activity

          People

            Unassigned Unassigned
            jlmagc Jose L Martinez-Avial
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: