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
Error page has HTML error when writePoweredBy is enabled. #6520
Comments
@gencarnacao as the fix is trivial, would you be interested in issuing a PR to fix it? |
We validate that the JSON error output is sane in our ErrorHandlerTest. |
@sbordet I tried. There should be a PR pending. Somewhere. |
+ Updating tests to ensure that output is xml verified + Updating output to use `<hr>` element properly. Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Opened proper fix (with testcase to verify output format validitiy) as PR #6525 |
Saw the PR, unless I misundertood I think there is a typo. |
The So this is invalid: While in strict HTML5 you don't have to close the |
…alid-xhtml-xml Issue #6520 - Fixing ErrorHandler output of text/html
+ Updating tests to ensure that output is xml verified + Updating output to use `<hr>` element properly. Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
…valid-xhtml-xml Issue #6520 - Fixing ErrorHandler output of text/html
Jetty version(s)
At least since 9.4.x
Description
The footer of the page, containing the "Powered By" line has an incorrect closing html tag. This causes issues when trying to parse the file automatically although visually in browsers this is undetectable.
How to reproduce?
With the Powered By footer enabled, trigger any error page (easiest is 404). I detected this on a running Jenkins installation while trying to access the jobs api of a non-existent job.
https://github.com/eclipse/jetty.project/blob/9d6db9e0986b352e54c7a03a3a1564179b69e10d/jetty-server/src/main/java/org/eclipse/jetty/server/handler/ErrorHandler.java#L400
I can avoid the problem by setting the 'Accept' header to 'application/json' which then returns a correct payload and is parseable.
The text was updated successfully, but these errors were encountered: