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

TCK for Servlet 6.1 invalid error code in servlet.tck.api.jakarta_servlet_http.httpservletresponse #660

Closed
janbartel opened this issue Jun 20, 2024 · 2 comments
Assignees
Labels
Bug Software problem

Comments

@olamy olamy self-assigned this Jun 20, 2024
@olamy olamy changed the title TCK for Servlet 6.1 error in servlet.tck.api.jakarta_servlet_http.httpservletresponse test TCK for Servlet 6.1 invalid error code in servlet.tck.api.jakarta_servlet_http.httpservletresponse Jun 21, 2024
@olamy olamy added the Bug Software problem label Jun 21, 2024
olamy added a commit that referenced this issue Jun 21, 2024
Signed-off-by: Olivier Lamy <[email protected]>
@markt-asf
Copy link
Contributor

I do not believe that it is intended that this test uses ServletErrorPage.

ServletErrorPage returns a plain text response but this test is expecting a content type of text\html.

The test expects the error page to echo the message passed to sendError(int sc, String msg) but ServletErrorPage only echos this message if it contains the text error page invoked which it does not in this case.

The test is only relying on documented behaviour of HttpServletResponse.sendError(int, String) (use the provided status code, send on HTML response, send the message in the response) and does not require a custom error page for this.

The use of status code 411 appears to be solely for the sendError_StringErrorPageTest.

I am curious why you think this test should invoke ServletErrorPage.

I'll leave this open for a few days in case I have missed something but unless we reach consensus that this test should call ServletErrroPage I intend to close this issue with no further action.

@janbartel
Copy link
Contributor Author

@markt-asf oops my bad. I was confused by the similarity of the error code used in the test and the error code mapped for the error page - looked like a typo. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Software problem
Projects
None yet
Development

No branches or pull requests

3 participants