Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

jetty-12 ee10 ServletApiResponse.addIntHeader does not ignore headers after response committed #9649

Closed
janbartel opened this issue Apr 14, 2023 · 1 comment
Labels
Bug For general bugs on Jetty side TCK For various Specification Test Compatibility Kits (eg: Servlet, WebSocket, HTTP/2, etc)

Comments

@janbartel
Copy link
Contributor

The javadoc for HttpServletResponse.sendError says:

After using this method, the response should be considered to be committed and should not be written to.

The tck test:

com/sun/ts/tests/servlet/spec/httpservletresponse/URLClient.java.sendErrorCommitTest

does a sendError followed by setting some headers:

    PrintWriter pw = response.getWriter();
    response.sendError(HttpServletResponse.SC_OK, "sendErrorCommitTest");
    response.addIntHeader("header1", 12345);

The test expects the header not to be set, but fails because we are allowing the headers to be set after sendError.

@janbartel janbartel added Bug For general bugs on Jetty side TCK For various Specification Test Compatibility Kits (eg: Servlet, WebSocket, HTTP/2, etc) labels Apr 14, 2023
@janbartel janbartel changed the title jetty-12 ee10 ServletApiResponse.sendError does not mark the response as being committed jetty-12 ee10 ServletApiResponse.addIntHeader does not ignore headers after response committed Apr 24, 2023
@janbartel
Copy link
Contributor Author

Fixed via #9668

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug For general bugs on Jetty side TCK For various Specification Test Compatibility Kits (eg: Servlet, WebSocket, HTTP/2, etc)
Projects
None yet
Development

No branches or pull requests

1 participant