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

Unified Diff: third_party/WebKit/Source/platform/network/HTTPParsers.h

Issue 2310783003: Stop ignoring whitespaces in the middle of MIME type in a Content-Type header (Closed)
Patch Set: Rebase Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/network/HTTPParsers.h
diff --git a/third_party/WebKit/Source/platform/network/HTTPParsers.h b/third_party/WebKit/Source/platform/network/HTTPParsers.h
index 98161593bf9a38235aa73b4ef8a1f8c86559f122..64d9b09cb6eecf26290cac8b58b6cc717c2a1dc7 100644
--- a/third_party/WebKit/Source/platform/network/HTTPParsers.h
+++ b/third_party/WebKit/Source/platform/network/HTTPParsers.h
@@ -105,8 +105,12 @@ PLATFORM_EXPORT double parseDate(const String&);
// Given a Media Type (like "foo/bar; baz=gazonk" - usually from the
// 'Content-Type' HTTP header), extract and return the "type/subtype" portion
// ("foo/bar").
-// Note: This function does not in any way check that the "type/subtype" pair
-// is well-formed.
+//
+// Note:
+// - This function does not in any way check that the "type/subtype" pair
+// is well-formed.
+// - OWSes at the head and the tail of the region before the first semicolon
+// are trimmed.
PLATFORM_EXPORT AtomicString extractMIMETypeFromMediaType(const AtomicString&);
PLATFORM_EXPORT String extractCharsetFromMediaType(const String&);
PLATFORM_EXPORT void findCharsetInMediaType(const String& mediaType, unsigned& charsetPos, unsigned& charsetLen, unsigned start = 0);

Powered by Google App Engine
This is Rietveld 408576698