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

Unified Diff: WebCore/platform/MIMETypeRegistry.cpp

Issue 2845006: Merge 57386 - 2010-04-09 Abhishek Arya <inferno@chromium.org>... (Closed) Base URL: svn://chrome-svn/chrome/branches/WebKit/375/
Patch Set: Created 10 years, 6 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
« no previous file with comments | « WebCore/dom/DOMImplementation.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: WebCore/platform/MIMETypeRegistry.cpp
===================================================================
--- WebCore/platform/MIMETypeRegistry.cpp (revision 49838)
+++ WebCore/platform/MIMETypeRegistry.cpp (working copy)
@@ -203,6 +203,7 @@
"application/vnd.wap.xhtml+xml",
"application/rss+xml",
"application/atom+xml",
+ "application/json",
#if ENABLE(SVG)
"image/svg+xml",
#endif
@@ -210,7 +211,12 @@
"application/x-ftp-directory",
#endif
"multipart/x-mixed-replace"
+ // Note: ADDING a new type here will probably render it as HTML. This can
+ // result in cross-site scripting.
};
+ COMPILE_ASSERT(sizeof(types) / sizeof(types[0]) <= 16,
+ nonimage_mime_types_must_be_less_than_or_equal_to_16);
+
for (size_t i = 0; i < sizeof(types)/sizeof(types[0]); ++i)
supportedNonImageMIMETypes->add(types[i]);
« no previous file with comments | « WebCore/dom/DOMImplementation.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698