Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(152)

Issue 2310783003: Stop ignoring whitespaces in the middle of MIME type in a Content-Type header (Closed)

Created:
4 years, 3 months ago by tyoshino (SeeGerritForStatus)
Modified:
4 years, 3 months ago
Reviewers:
Mike West
CC:
blink-reviews, chromium-reviews
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Stop ignoring whitespaces in the middle of MIME type in a Content-Type header extractMIMETypeFromMediaType() has been treating \n (0x0a), \v (0x0b), \f (0x0c), \r (0x0d) and Unicode characters with BIDI property WS as white space in addition to the OWS characters SP (0x20) and HTAB (0x09). These characters were trimmed not only from the head and tail of the type/subtype part but also from the middle of the value, i.e. when "te xt/ht ml" is received it's automatically normalized into "text/html". This CL fixes this spec violation partially by: - limiting characters which are dealt with as whitespaces to only SP and HTAB as specified in the RFC 7230 - stop trimming white space characters (including SP and HTAB) from the middle of type/subtype value We don't add full ABNF validation to drop everything that doesn't conform to the media-type ABNF as we're not sure how much the result of such strict fixing would be. See also https://bugs.webkit.org/show_bug.cgi?id=8644 R=mkwst@chromium.org BUG=642346 Committed: https://crrev.com/7e8584afcaa263a69c49a36e9380bc7a715e2284 Cr-Commit-Position: refs/heads/master@{#416586}

Patch Set 1 #

Patch Set 2 : Rebase #

Total comments: 1

Patch Set 3 : Update layout test #

Patch Set 4 : Rebase #

Messages

Total messages: 15 (10 generated)
tyoshino (SeeGerritForStatus)
BTW, Mike, again you still have OOO message in your name :) https://codereview.chromium.org/2310783003/diff/20001/third_party/WebKit/Source/platform/network/HTTPParsers.cpp File third_party/WebKit/Source/platform/network/HTTPParsers.cpp ...
4 years, 3 months ago (2016-09-05 10:45:30 UTC) #7
Mike West
LGTM. Thanks for addressing this!
4 years, 3 months ago (2016-09-05 12:00:12 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2310783003/60001
4 years, 3 months ago (2016-09-06 03:53:53 UTC) #12
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years, 3 months ago (2016-09-06 05:27:42 UTC) #13
commit-bot: I haz the power
4 years, 3 months ago (2016-09-06 05:29:40 UTC) #15
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/7e8584afcaa263a69c49a36e9380bc7a715e2284
Cr-Commit-Position: refs/heads/master@{#416586}

Powered by Google App Engine
This is Rietveld 408576698