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 parameter parsing tests #7764

Merged
merged 17 commits into from
Dec 7, 2017
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Hit end-of-file branches
  • Loading branch information
annevk committed Dec 1, 2017
commit 6d808001c0f212a002abf53a46de5f3390df98ff
15 changes: 15 additions & 0 deletions mimesniff/mime-types/resources/mime-types.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@
"navigable": true,
"encoding": "GBK"
},
{
"input": "TEXT/HTML;CHARSET=GBK",
"output": "text/html;charset=GBK",
"navigable": true,
"encoding": "GBK"
},
"Legacy comment syntax",
{
"input": "text/html;charset=gbk(",
Expand Down Expand Up @@ -174,6 +180,15 @@
"input": "!#$%&'*+-.^_`|~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvxyz/!#$%&'*+-.^_`|~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvxyz;!#$%&'*+-.^_`|~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvxyz=!#$%&'*+-.^_`|~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvxyz",
"output": "!#$%&'*+-.^_`|~0123456789abcdefghijklmnopqrstuvxyzabcdefghijklmnopqrstuvxyz/!#$%&'*+-.^_`|~0123456789abcdefghijklmnopqrstuvxyzabcdefghijklmnopqrstuvxyz;!#$%&'*+-.^_`|~0123456789abcdefghijklmnopqrstuvxyzabcdefghijklmnopqrstuvxyz=!#$%&'*+-.^_`|~0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvxyz"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"w" is missing in a few places here; the input has 1 w (should be 2) and the output has 0.

},
"End-of-file handling",
{
"input": "x/x;test",
"output": "x/x"
},
{
"input": "x/x;test=\"\\",
"output": "x/x;test=\"\\\\\""
},
"Failure",
{
"input": "",
Expand Down