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

MIME type parsing, backslash #38

Closed
annevk opened this issue Oct 9, 2017 · 6 comments
Closed

MIME type parsing, backslash #38

annevk opened this issue Oct 9, 2017 · 6 comments

Comments

@annevk
Copy link
Member

annevk commented Oct 9, 2017

text/html;test="\";charset=gbk results in GBK in Edge and Safari, which is wrong per the RFC.

My PR also doesn't handle this correctly.

@annevk
Copy link
Member Author

annevk commented Oct 10, 2017

Content-Type: text/html;charset="\g\b\k" only results in GBK in Firefox. All other browsers are wrong per the RFC.

@annevk
Copy link
Member Author

annevk commented Oct 10, 2017

Same for something like Content-Type: text/html;charset="\ gbk". (ASCII whitespace is trimmed when getting an encoding label from a string.)

@annevk
Copy link
Member Author

annevk commented Oct 10, 2017

Weirdly enough the results are the same for Content-Type: text/html;charset=" gbk" too. I guess non-Firefox doesn't go through https://encoding.spec.whatwg.org/#concept-encoding-get necessarily.

@annevk
Copy link
Member Author

annevk commented Oct 10, 2017

Also test: text/html;charset="gbk\, text/html;charset="gbk.

@annevk
Copy link
Member Author

annevk commented Nov 24, 2017

Bugs filed and tested by #42, so closing.

@annevk annevk closed this as completed Nov 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

1 participant