New issue
Advanced search Search tips

Issue 789089 link

Starred by 1 user

Issue metadata

Status: Duplicate
Merged: issue 892337
Owner:
Closed: Oct 4
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Restrict code points used in MIME types

Project Member Reported by annevank...@gmail.com, Nov 28 2017

Issue description

Based on discussion with Yutaka, in https://github.com/whatwg/mimesniff/issues/45 we're considering restricting MIME types to the same characters allowed by HTTP, but doing so in a way that we don't fail recognizing the following as HTML:

  text/html;
  text/html;?=x
  text/html;x=?

One consequence of this is that

  text/html;charset= gbk

would end up not recognizing the charset parameter as whitespace is not permitted in the HTTP token production.

I was wondering what you think of that bnc? (It goes a bit counter to what we discussed in https://bugs.chromium.org/p/chromium/issues/detail?id=772834.)

The advantage of this is that once we've parsed and then serialized a MIME type, we always know it to be HTTP compatible, including with non-browser systems.
 
While working on this I came upon a solution that would still make

  text/html;charset= gbk

recognize GBK in the end (it would just affect the serialization). Perhaps it's best to close this issue and then have a dedicated issue once the specification and all the tests are ready.

Unless any of you would prefer an alternative approach to getting this done. Just let me know.
Components: -Internals>Network Internals>Network>HTTP

Comment 3 by mmenke@chromium.org, Mar 14 2018

Owner: mmenke@chromium.org
Status: Assigned (was: Untriaged)
Components: Internals>Network
Components: -Internals>Network>HTTP
Mergedinto: 892337
Status: Duplicate (was: Assigned)
Creating a catchall bug.

Sign in to add a comment