-
-
Notifications
You must be signed in to change notification settings - Fork 15.8k
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
HttpUtil.getCharset() fails for charset in double-quotes #11370
Comments
@NiteshKant can you please take a look ? |
NiteshKant
pushed a commit
to NiteshKant/netty
that referenced
this issue
Jun 7, 2021
__Motivation__ As described in netty#11370 we should support quoted charset values __Modification__ Modify `HttpUtil.getCharset(CharSequence contentTypeValue, Charset defaultCharset)` to trim the double-quotes if present. __Result__ `HttpUtil.getCharset()` now supports quoted charsets.
raidyue
pushed a commit
to raidyue/netty
that referenced
this issue
Jul 8, 2022
__Motivation__ As described in netty#11370 we should support quoted charset values __Modification__ Modify `HttpUtil.getCharset(CharSequence contentTypeValue, Charset defaultCharset)` to trim the double-quotes if present. __Result__ `HttpUtil.getCharset()` now supports quoted charsets. Fixes netty#11370
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I understood from RFC 7231 the content-type header can have charset value in double-quotes.
Expected behaviour
When the content-type header is set to
text/html; charset="utf-8"
then the charset is parsed correctly as utf-8.Actual behaviour
When the content-type header is set to
text/html; charset="utf-8"
then the charset is parsed incorrectly as default ISO-8859-1.Steps to reproduce
Change the
testGetCharset()
to look like this:Netty version
b0d1bff
The text was updated successfully, but these errors were encountered: