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]); |