Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-1160

ServletPrintWriter.checkError does not flush

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 2.0.0.Beta1, 1.4.19.Final
    • None
    • None
    • None
    • Hide

      Create Servlet, get the printWriter from response. Write something. invoke checkError(). Output is not flushed.

      Show
      Create Servlet, get the printWriter from response. Write something. invoke checkError(). Output is not flushed.
    • Migration
    • Workaround Exists
    • Hide

      flush the steam before calling checkError.

      Show
      flush the steam before calling checkError.

      io.undertow.servlet.spec.ServletPrintWriter.checkError() does not flush the stream.

      according to JDK docs, printWriter.checkError() 'Flushes the stream if it's not closed and checks its error state'. This bug discovered by accident when converting a Payara to wildfly, which used checkError to flush the stream, and check errors.

              sdouglas1@redhat.com Stuart Douglas (Inactive)
              tonywestonuk tony weston (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: