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
Merged

Conversation

annevk
Copy link
Member

@annevk annevk commented Oct 30, 2018

@annevk
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 October 31, 2018 07:55
@annevk
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
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
Copy link

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

@annevk
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
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).

Copy link
Member

@domenic domenic left a comment

Choose a reason for hiding this comment

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

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
@annevk annevk deleted the annevk/http-whitespace branch November 13, 2018 11:11
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 14, 2018
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
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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 3, 2019
Automatic update from web-platform-testsMIME types: test 0x0B, 0x0C, and newlines

For whatwg/mimesniff#90.
--

wpt-commits: 6aeb68e38a61c2e332a7592f5cad640cf58b73f2
wpt-pr: 13615

UltraBlame original commit: 726abced3085ed5e9ef5b0df43e9561cac6f590d
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 3, 2019
Automatic update from web-platform-testsMIME types: test 0x0B, 0x0C, and newlines

For whatwg/mimesniff#90.
--

wpt-commits: 6aeb68e38a61c2e332a7592f5cad640cf58b73f2
wpt-pr: 13615

UltraBlame original commit: 726abced3085ed5e9ef5b0df43e9561cac6f590d
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 3, 2019
Automatic update from web-platform-testsMIME types: test 0x0B, 0x0C, and newlines

For whatwg/mimesniff#90.
--

wpt-commits: 6aeb68e38a61c2e332a7592f5cad640cf58b73f2
wpt-pr: 13615

UltraBlame original commit: 726abced3085ed5e9ef5b0df43e9561cac6f590d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants