Title: [136361] trunk/Source/WebCore
- Revision
- 136361
- Author
- mary...@torchmobile.com.cn
- Date
- 2012-12-02 19:30:25 -0800 (Sun, 02 Dec 2012)
Log Message
should sniff it if mimetype don't contain a slash.
https://bugs.webkit.org/show_bug.cgi?id=102778
Reviewed by George Staikos.
Based on http://mimesniff.spec.whatwg.org/, a valid media type
is the string represented by concatenating type, the string "/",
and subtype. So if the mimetype don't contain slash, we should
possible get sniffed type from the content like Firefox/chrome/safari.
RIM Bug# 219590, internally reviewed by Liam Quinn.
No new tests, the patch only impact qt/blackberry porting to be consistent
with chrome, other portings have their own behavior.
* platform/network/MIMESniffing.cpp:
(std::isUnknownType):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (136360 => 136361)
--- trunk/Source/WebCore/ChangeLog 2012-12-03 03:12:08 UTC (rev 136360)
+++ trunk/Source/WebCore/ChangeLog 2012-12-03 03:30:25 UTC (rev 136361)
@@ -1,3 +1,23 @@
+2012-12-02 Mary Wu <mary...@torchmobile.com.cn>
+
+ should sniff it if mimetype don't contain a slash.
+ https://bugs.webkit.org/show_bug.cgi?id=102778
+
+ Reviewed by George Staikos.
+
+ Based on http://mimesniff.spec.whatwg.org/, a valid media type
+ is the string represented by concatenating type, the string "/",
+ and subtype. So if the mimetype don't contain slash, we should
+ possible get sniffed type from the content like Firefox/chrome/safari.
+
+ RIM Bug# 219590, internally reviewed by Liam Quinn.
+
+ No new tests, the patch only impact qt/blackberry porting to be consistent
+ with chrome, other portings have their own behavior.
+
+ * platform/network/MIMESniffing.cpp:
+ (std::isUnknownType):
+
2012-12-02 Otto Derek Cheung <otche...@rim.com>
[BlackBerry] Adding checks for null when checking cookie status in CookieJarBlackBerry
Modified: trunk/Source/WebCore/platform/network/MIMESniffing.cpp (136360 => 136361)
--- trunk/Source/WebCore/platform/network/MIMESniffing.cpp 2012-12-03 03:12:08 UTC (rev 136360)
+++ trunk/Source/WebCore/platform/network/MIMESniffing.cpp 2012-12-03 03:30:25 UTC (rev 136361)
@@ -65,7 +65,13 @@
static inline bool isUnknownType(const char* type)
{
- return isTextInList(type, unknownTypesSize, unknownTypes);
+ if (isTextInList(type, unknownTypesSize, unknownTypes))
+ return true;
+ if (!strchr(type, '/')) {
+ // Firefox/Chrome rejects a mime type if it does not contain a slash.
+ return true;
+ }
+ return false;
}
const char* xmlTypes[] = {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes