Another workaround for <rdar://problem/5386894>
authoraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 5 Aug 2007 04:21:52 +0000 (04:21 +0000)
committeraroben <aroben@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 5 Aug 2007 04:21:52 +0000 (04:21 +0000)
        Reviewed by Sam.

        This fixed ~150 failing tests.

        * platform/network/cf/ResourceResponseCFNet.cpp:
        (WebCore::ResourceResponse::doUpdateResourceResponse): Hardcode the
        MIME type for .svg files as well.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@24872 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebCore/ChangeLog
WebCore/platform/network/cf/ResourceResponseCFNet.cpp

index 29a2e77dc6fedfd3aee5710c94987a9b153265fe..a2764868cf9fcdeea83dda4110abfd7a2cb48956 100644 (file)
@@ -1,3 +1,15 @@
+2007-08-04  Adam Roben  <aroben@apple.com>
+
+        Another workaround for <rdar://problem/5386894>
+
+        Reviewed by Sam.
+
+        This fixed ~150 failing tests.
+
+        * platform/network/cf/ResourceResponseCFNet.cpp:
+        (WebCore::ResourceResponse::doUpdateResourceResponse): Hardcode the
+        MIME type for .svg files as well.
+
 2007-08-04  Adam Roben  <aroben@apple.com>
 
         Workaround for <rdar://problem/5386894> CFURLResponseGetMIMEType returns "text/html" for local .xhtml and .xml files
index 9857601885339c9203ed513e1e0eddb73c07765d..c462fc76de263475de0109bc2a269ef9fdd7d892 100644 (file)
@@ -124,10 +124,13 @@ void ResourceResponse::doUpdateResourceResponse()
         const String& path = m_url.path();
         static const String xhtmlExt(".xhtml");
         static const String xmlExt(".xml");
+        static const String svgExt(".svg");
         if (path.endsWith(xhtmlExt, false))
             m_mimeType = "application/xhtml+xml";
         else if (path.endsWith(xmlExt, false))
             m_mimeType = "text/xml";
+        else if (path.endsWith(svgExt, false))
+            m_mimeType = "image/svg+xml";
     }
 }