[wildfly-dev] Behavior of javax.servlet.ServletResponse#isCommitted

Pedro Igor Silva psilva at redhat.com
Tue Oct 21 10:53:32 EDT 2014


Hi,

    I'm using latest build from wildfly upstream/master.

    Would like to know if there is an issue on how Undertow recognize that a response is already commited or not.

    My code is setting a header and sending an error like that

        response.setHeader(REQUIRES_AUTHENTICATION_HEADER_NAME, AUTHENTICATION_SCHEME_NAME);
        response.sendError(HttpServletResponse.SC_UNAUTHORIZED);

    and isCommited is always returning "false" after that. To change this behavior I have to force a flush, so isCommited returns true.

    Both WildFly 8.1.0.Final and EAP behave differently and isCommited returns "true" without requiring a manual flush. Is this an issue ?

Regards.
Pedro Igor


More information about the wildfly-dev mailing list