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 58c66bc9dedc8b5484554e8038ce2383939862c6..bd15e885faa3b0df75a6c170f3c6fbcd66237738 100644 |
--- a/third_party/WebKit/Source/platform/network/HTTPParsers.h |
+++ b/third_party/WebKit/Source/platform/network/HTTPParsers.h |
@@ -97,6 +97,12 @@ PLATFORM_EXPORT bool isValidHTTPFieldContentRFC7230(const String&); |
PLATFORM_EXPORT bool isValidHTTPToken(const String&); |
PLATFORM_EXPORT bool parseHTTPRefresh(const String& refresh, bool fromHttpEquivMeta, double& delay, String& url); |
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. |
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); |