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

Correct Content-Type within HTML error pages #6869

Closed
boughtonp opened this issue Sep 19, 2021 · 0 comments · Fixed by #6873 or #6878
Closed

Correct Content-Type within HTML error pages #6869

boughtonp opened this issue Sep 19, 2021 · 0 comments · Fixed by #6873 or #6878
Labels
Bug For general bugs on Jetty side

Comments

@boughtonp
Copy link

Jetty version(s)
9.4.43 and 10.0.1

Description
A Jetty-generated 404 response includes header Content-Type: text/html;charset=iso-8859-1

The returned HTML includes <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>

Directory browsing response has utf-8 for both; I haven't checked other generated pages so there may be other mismatches.

How to reproduce?

JETTY_HOME=/path/to/jetty-home-9.4.43.v20210629
JETTY_BASE=test-charset
mkdir -p "$JETTY_BASE/webapps/ROOT"
cd "$JETTY_BASE"
java -jar $JETTY_HOME/start.jar --add-to-start=http,deploy
java -jar $JETTY_HOME/start.jar &
curl -isS 'http://localhost:8080/missing'
@boughtonp boughtonp added the Bug For general bugs on Jetty side label Sep 19, 2021
@gregw gregw added this to To do in Jetty 9.4.44 FROZEN via automation Sep 19, 2021
@gregw gregw added this to To do in Jetty 10.0.7/11.0.7 FROZEN via automation Sep 19, 2021
gregw added a commit that referenced this issue Sep 20, 2021
Fix #6869 HTML Error page charset passed as request attribute

Signed-off-by: Greg Wilkins <gregw@webtide.com>
@gregw gregw changed the title Jetty 404 has HTTP Content-Type with iso-8859-1 charset, but HTML says utf-8. Correct Content-Type within HTML error pages Sep 20, 2021
@joakime joakime linked a pull request Sep 20, 2021 that will close this issue
@joakime joakime moved this from To do to In progress in Jetty 9.4.44 FROZEN Sep 20, 2021
@joakime joakime moved this from To do to In progress in Jetty 10.0.7/11.0.7 FROZEN Sep 20, 2021
gregw added a commit that referenced this issue Sep 21, 2021
Fix #6869 HTML Error page charset passed as request attribute

Signed-off-by: Greg Wilkins <gregw@webtide.com>
gregw added a commit that referenced this issue Sep 21, 2021
Fix #6869 HTML Error page charset passed as request attribute

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Jetty 9.4.44 FROZEN automation moved this from In progress to Done Sep 21, 2021
Jetty 10.0.7/11.0.7 FROZEN automation moved this from In progress to Done Sep 21, 2021
gregw added a commit that referenced this issue Sep 21, 2021
Fix #6869 HTML Error page charset passed as request attribute

Signed-off-by: Greg Wilkins <gregw@webtide.com>
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
Projects
No open projects
1 participant