Changeset 58158 in webkit


Ignore:
Timestamp:
Apr 23, 2010 1:23:50 AM (14 years ago)
Author:
ddkilzer@apple.com
Message:

<http://webkit.org/b/38032> No need to content sniff 304 responses
<rdar://problem/7891726>

Reviewed by Brady Eidson.

  • platform/network/mac/ResourceHandleMac.mm:

(-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
No need to adjust the MIME type on 304 responses since they're
only used to determine if the resource needs to be refetched.

Location:
trunk/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebCore/ChangeLog

    r58157 r58158  
     12010-04-23  David Kilzer  <ddkilzer@apple.com>
     2
     3        <http://webkit.org/b/38032> No need to content sniff 304 responses
     4        <rdar://problem/7891726>
     5
     6        Reviewed by Brady Eidson.
     7
     8        * platform/network/mac/ResourceHandleMac.mm:
     9        (-[WebCoreResourceHandleAsDelegate connection:didReceiveResponse:]):
     10        No need to adjust the MIME type on 304 responses since they're
     11        only used to determine if the resource needs to be refetched.
     12
    1132010-04-23  David Kilzer  <ddkilzer@apple.com>
    214
  • trunk/WebCore/platform/network/mac/ResourceHandleMac.mm

    r57996 r58158  
    745745    CallbackGuard guard;
    746746
    747     [r adjustMIMETypeIfNecessary];
     747    // Avoid MIME type sniffing if the response comes back as 304 Not Modified.
     748    int statusCode = [r respondsToSelector:@selector(statusCode)] ? [(id)r statusCode] : 0;
     749    if (statusCode != 304)
     750        [r adjustMIMETypeIfNecessary];
    748751
    749752    if ([m_handle->request().nsURLRequest() _propertyForKey:@"ForceHTMLMIMEType"])
Note: See TracChangeset for help on using the changeset viewer.