Changeset 21794 in webkit


Ignore:
Timestamp:
May 25, 2007 8:06:25 PM (17 years ago)
Author:
weinig
Message:

Reviewed by Oliver of the Hunt.

Fixed <rdar://problem/5230247> at least 43 xhtml tests fail in
Leopard because they are being interpreted as html

Adds a work around for <rdar://problem/5230154> which explicitly
sets local .xhtml files to have the MIME type application/xhtml+xml.

  • platform/network/mac/ResourceResponseMac.mm: (WebCore::ResourceResponse::doUpdateResourceResponse):
Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r21793 r21794  
     12007-05-25  Sam Weinig  <sam@webkit.org>
     2
     3        Reviewed by Oliver of the Hunt.
     4
     5        Fixed <rdar://problem/5230247> at least 43 xhtml tests fail in
     6        Leopard because they are being interpreted as html
     7
     8        Adds a work around for <rdar://problem/5230154> which explicitly
     9        sets local .xhtml files to have the MIME type application/xhtml+xml.
     10
     11        * platform/network/mac/ResourceResponseMac.mm:
     12        (WebCore::ResourceResponse::doUpdateResourceResponse):
     13
    1142007-05-25  Geoffrey Garen  <ggaren@apple.com>
    215
  • trunk/WebCore/platform/network/mac/ResourceResponseMac.mm

    r19660 r21794  
    7676        while (NSString *name = [e nextObject])
    7777            m_httpHeaderFields.set(name, [headers objectForKey:name]);
    78     } else
     78    } else {
    7979        m_httpStatusCode = 0;
     80
     81#ifndef BUILDING_ON_TIGER
     82        // FIXME: This is a work around for <rdar://problem/5230154> (-[NSURLConnection initWithRequest:delegate:]
     83        // is returning incorrect MIME type for local .xhtml files) which is only required in Leopard.
     84        if (m_url.isLocalFile() && m_mimeType == "text/html") {
     85            const String& path = m_url.path();
     86            static const String xhtmlExt(".xhtml");
     87            if (path.endsWith(xhtmlExt, false))
     88                m_mimeType = "application/xhtml+xml";
     89        }
     90#endif
     91    }
    8092}
    8193
Note: See TracChangeset for help on using the changeset viewer.