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

Side by Side Diff: third_party/WebKit/Source/platform/network/HTTPParsers.h

Issue 1706243002: Don't use SVG resource documents with an unrecognized MIME-type (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use testharness; add unit test for extractMIMETypeFromMediaType Created 4 years, 10 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org) 2 * Copyright (C) 2006 Alexey Proskuryakov (ap@webkit.org)
3 * Copyright (C) 2009 Google Inc. All rights reserved. 3 * Copyright (C) 2009 Google Inc. All rights reserved.
4 * Copyright (C) 2011 Apple Inc. All Rights Reserved. 4 * Copyright (C) 2011 Apple Inc. All Rights Reserved.
5 * 5 *
6 * Redistribution and use in source and binary forms, with or without 6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions 7 * modification, are permitted provided that the following conditions
8 * are met: 8 * are met:
9 * 9 *
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 { 90 {
91 } 91 }
92 }; 92 };
93 93
94 PLATFORM_EXPORT ContentDispositionType contentDispositionType(const String&); 94 PLATFORM_EXPORT ContentDispositionType contentDispositionType(const String&);
95 PLATFORM_EXPORT bool isValidHTTPHeaderValue(const String&); 95 PLATFORM_EXPORT bool isValidHTTPHeaderValue(const String&);
96 PLATFORM_EXPORT bool isValidHTTPFieldContentRFC7230(const String&); 96 PLATFORM_EXPORT bool isValidHTTPFieldContentRFC7230(const String&);
97 PLATFORM_EXPORT bool isValidHTTPToken(const String&); 97 PLATFORM_EXPORT bool isValidHTTPToken(const String&);
98 PLATFORM_EXPORT bool parseHTTPRefresh(const String& refresh, bool fromHttpEquivM eta, double& delay, String& url); 98 PLATFORM_EXPORT bool parseHTTPRefresh(const String& refresh, bool fromHttpEquivM eta, double& delay, String& url);
99 PLATFORM_EXPORT double parseDate(const String&); 99 PLATFORM_EXPORT double parseDate(const String&);
100
101 // Given a Media Type (like "foo/bar; baz=gazonk" - usually from the
102 // 'Content-Type' HTTP header), extract and return the "type/subtype" portion
103 // ("foo/bar").
104 // Note: This function does not in any way check that the "type/subtype" pair
105 // is well-formed.
100 PLATFORM_EXPORT AtomicString extractMIMETypeFromMediaType(const AtomicString&); 106 PLATFORM_EXPORT AtomicString extractMIMETypeFromMediaType(const AtomicString&);
101 PLATFORM_EXPORT String extractCharsetFromMediaType(const String&); 107 PLATFORM_EXPORT String extractCharsetFromMediaType(const String&);
102 PLATFORM_EXPORT void findCharsetInMediaType(const String& mediaType, unsigned& c harsetPos, unsigned& charsetLen, unsigned start = 0); 108 PLATFORM_EXPORT void findCharsetInMediaType(const String& mediaType, unsigned& c harsetPos, unsigned& charsetLen, unsigned start = 0);
103 PLATFORM_EXPORT ReflectedXSSDisposition parseXSSProtectionHeader(const String& h eader, String& failureReason, unsigned& failurePosition, String& reportURL); 109 PLATFORM_EXPORT ReflectedXSSDisposition parseXSSProtectionHeader(const String& h eader, String& failureReason, unsigned& failurePosition, String& reportURL);
104 PLATFORM_EXPORT XFrameOptionsDisposition parseXFrameOptionsHeader(const String&) ; 110 PLATFORM_EXPORT XFrameOptionsDisposition parseXFrameOptionsHeader(const String&) ;
105 PLATFORM_EXPORT CacheControlHeader parseCacheControlDirectives(const AtomicStrin g& cacheControlHeader, const AtomicString& pragmaHeader); 111 PLATFORM_EXPORT CacheControlHeader parseCacheControlDirectives(const AtomicStrin g& cacheControlHeader, const AtomicString& pragmaHeader);
106 PLATFORM_EXPORT void parseCommaDelimitedHeader(const String& headerValue, CommaD elimitedHeaderSet&); 112 PLATFORM_EXPORT void parseCommaDelimitedHeader(const String& headerValue, CommaD elimitedHeaderSet&);
107 113
108 PLATFORM_EXPORT ContentTypeOptionsDisposition parseContentTypeOptionsHeader(cons t String& header); 114 PLATFORM_EXPORT ContentTypeOptionsDisposition parseContentTypeOptionsHeader(cons t String& header);
109 115
110 } // namespace blink 116 } // namespace blink
111 117
112 #endif 118 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGUseElement.cpp ('k') | third_party/WebKit/Source/platform/network/HTTPParsersTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698