Uploaded image for project: 'Cocoon'
  1. Cocoon
  2. COCOON-2237

Buffering of response does not work correctly in SSF

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.2
    • Fix Version/s: 2.2
    • Labels:
      None

      Description

      Class HttpServletResponseBufferingWrapper contains subtle bug when it comes to buffering of response. It relies its behaviour on HTTP status code and buffers only if it was set to 404.

      However, in following scenario current implementation won't work:
      1. stream = response.getOutputStream() //non buffering output stream is returned because by default status code is set to 200
      2. response.setStatusCode(404)
      3. stream.write() //write details about error, this is going to be written to response because non-buffering output stream is in use
      4. response.resetBufferedResponse() //this fails with IllegalStateException

        Activity

        Hide
        grek Grzegorz Kossakowski added a comment -
        Fixed in r685544.
        Show
        grek Grzegorz Kossakowski added a comment - Fixed in r685544.

          People

          • Assignee:
            grek Grzegorz Kossakowski
            Reporter:
            grek Grzegorz Kossakowski
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development