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

Use HTTP rather than ASCII whitespace #90

Merged
merged 1 commit into from Nov 13, 2018

Conversation

3 participants
@annevk
Copy link
Member

annevk commented Oct 30, 2018

@annevk

This comment has been minimized.

Copy link
Member Author

annevk commented Oct 30, 2018

(The reason Travis fails is because HTTP whitespace isn't yet defined by Fetch.)

@annevk annevk requested a review from domenic Oct 31, 2018

@annevk

This comment has been minimized.

Copy link
Member Author

annevk commented Oct 31, 2018

Hmm, so I guess I should look into contexts where MIME types can have newlines and how those are handled today (or not handled at all).

@annevk

This comment has been minimized.

Copy link
Member Author

annevk commented Nov 2, 2018

Per #42 (comment) canPlayType() et al, overrideMimeType(), and Blob look like the places where newlines could show up.

Because of that I think we should use HTTP whitespace here and not HTTP tab or space. Implementations that don't share their MIME type parser across the code base could have slightly more restrictive code in contexts where newlines by definitions cannot show up.

@MattMenke2 @asankah I take it that's agreeable? (I'll add some tests for the aforementioned contexts as well if they don't have any for newlines.)

Note to self: need to add HTTP whitespace (a code point based version) to Fetch.

@MattMenke2

This comment has been minimized.

Copy link

MattMenke2 commented Nov 2, 2018

Is this just CRs and LFs? If so, I'm fine with that.

@annevk

This comment has been minimized.

Copy link
Member Author

annevk commented Nov 2, 2018

Yes.

annevk added a commit to whatwg/fetch that referenced this pull request Nov 5, 2018

@annevk

This comment has been minimized.

Copy link
Member Author

annevk commented Nov 5, 2018

I updated the tests to also test HTTP newlines (as per above) and created whatwg/fetch#828 to define HTTP whitespace in Fetch for this kind of usage (and added a note that hopefully dissuades others from using it unless they have an eerily similar data structure).

@domenic

domenic approved these changes Nov 9, 2018

Copy link
Member

domenic left a comment

LGTM once HTTP whitespace is defined

annevk added a commit to web-platform-tests/wpt that referenced this pull request Nov 12, 2018

annevk added a commit to whatwg/fetch that referenced this pull request Nov 12, 2018

@annevk annevk merged commit 126286a into master Nov 13, 2018

2 checks passed

Participation annevk participates on behalf of Mozilla Corporation
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@annevk annevk deleted the annevk/http-whitespace branch Nov 13, 2018

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 14, 2018

Bug 1500405 [wpt PR 13615] - MIME types: test 0x0B and 0x0C, a=testonly
Automatic update from web-platform-testsMIME types: test 0x0B, 0x0C, and newlines

For whatwg/mimesniff#90.
--

wpt-commits: 6aeb68e38a61c2e332a7592f5cad640cf58b73f2
wpt-pr: 13615

staktrace pushed a commit to staktrace/gecko that referenced this pull request Nov 15, 2018

Bug 1500405 [wpt PR 13615] - MIME types: test 0x0B and 0x0C, a=testonly
Automatic update from web-platform-testsMIME types: test 0x0B, 0x0C, and newlines

For whatwg/mimesniff#90.
--

wpt-commits: 6aeb68e38a61c2e332a7592f5cad640cf58b73f2
wpt-pr: 13615

domenic added a commit to jsdom/whatwg-mimetype that referenced this pull request Nov 20, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.