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

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

Issue 2736283002: Allow ParsedContentType to reject multiple definitions of the same parameter (Closed)
Patch Set: check first Created 3 years, 9 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/ParsedContentType.h
diff --git a/third_party/WebKit/Source/platform/network/ParsedContentType.h b/third_party/WebKit/Source/platform/network/ParsedContentType.h
index a6f90089577f75bad4afbbfd4c2322d655c6c258..c0064e129240e49a52e2d91f434bacd097f5b578 100644
--- a/third_party/WebKit/Source/platform/network/ParsedContentType.h
+++ b/third_party/WebKit/Source/platform/network/ParsedContentType.h
@@ -49,9 +49,13 @@ class PLATFORM_EXPORT ParsedContentType final {
// When |Relaxed| is specified, the parser parses parameter values in a sloppy
// manner, i.e., only ';' and '"' are treated as special characters.
// See https://chromiumcodereview.appspot.com/23043002.
+ // When |Strict| is specified, the parser does not allow multiple values
+ // for the same parameter. Some RFCs based on RFC2045 (e.g. RFC6838) note that
+ // "It is an error for a specific parameter to be specified more than once."
enum class Mode {
Normal,
Relaxed,
+ Strict,
};
explicit ParsedContentType(const String&, Mode = Mode::Normal);

Powered by Google App Engine
This is Rietveld 408576698