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

ContentType with no char encoding should use previous char encoding #4719

Closed
janbartel opened this issue Mar 26, 2020 · 0 comments · Fixed by #4720
Closed

ContentType with no char encoding should use previous char encoding #4719

janbartel opened this issue Mar 26, 2020 · 0 comments · Fixed by #4720
Assignees
Labels
Specification For all industry Specifications (IETF / Servlet / etc) TCK For various Specification Test Compatibility Kits (eg: Servlet, WebSocket, HTTP/2, etc)

Comments

@janbartel
Copy link
Contributor

jetty-10.0.x

Servlet tck test com/sun/ts/tests/servlet/api/javax_servlet/servletresponse/URLClient.java.getContentTypeNull2Test.

If Response.setContentType() is called with a string that has no char encoding, any previously set char encoding should be used rather than the default char set for the new content type.
Eg
response.setContentType("foo/bar; charset=some-charset")
the charset encoding should now be some-charset
response.setContentType("text/xml")
the charset encoding should still be some-charset

@janbartel janbartel added Specification For all industry Specifications (IETF / Servlet / etc) TCK For various Specification Test Compatibility Kits (eg: Servlet, WebSocket, HTTP/2, etc) labels Mar 26, 2020
@janbartel janbartel self-assigned this Mar 26, 2020
janbartel added a commit that referenced this issue Mar 26, 2020
Signed-off-by: Jan Bartel <janb@webtide.com>
joakime added a commit that referenced this issue Mar 26, 2020
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
joakime added a commit that referenced this issue Mar 26, 2020
Minor formatting and more comments.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
janbartel added a commit that referenced this issue Mar 27, 2020
…ssumed

Signed-off-by: Jan Bartel <janb@webtide.com>
janbartel added a commit that referenced this issue Mar 31, 2020
)

* Issue #4719 Keep previous charencoding if not set in content type

Signed-off-by: Jan Bartel <janb@webtide.com>

* Issue #4719 - Adding unit tests for charset reset/change

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Specification For all industry Specifications (IETF / Servlet / etc) TCK For various Specification Test Compatibility Kits (eg: Servlet, WebSocket, HTTP/2, etc)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant