[Webkit-unassigned] [Bug 63674] Get webkit to compile with USE(CFNETWORK) enabled on Mac

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Jun 29 21:13:42 PDT 2011


https://bugs.webkit.org/show_bug.cgi?id=63674





--- Comment #3 from Andy Estes <aestes at apple.com>  2011-06-29 21:13:42 PST ---
(From update of attachment 99195)
View in context: https://bugs.webkit.org/attachment.cgi?id=99195&action=review

> Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp:220
> +#if PLATFORM(MAC)
> +    // Avoid MIME type sniffing if the response comes back as 304 Not Modified.
> +    CFHTTPMessageRef msg = CFURLResponseGetHTTPResponse(cfResponse);
> +    int statusCode =  msg ? CFHTTPMessageGetResponseStatusCode(msg) : 0;
> +
> +    if (statusCode != 304)
> +        adjustMIMETypeIfNecessary(cfResponse);
> +
> +    if (_CFURLRequestCopyProtocolPropertyForKey(handle->firstRequest().cfURLRequest(), CFSTR("ForceHTMLMIMEType")))
> +        CFURLResponseSetMIMEType(cfResponse, CFSTR("text/html"));

This seemed like a change in behavior to until I looked in ResourceHandleMac.mm and saw the NSURLResponse version of this code. A note in the ChangeLog about why this was added would have cleared this up.

> Source/WebCore/platform/network/cf/ResourceHandleCFNet.cpp:831
> -        request = 0;
> +        CFURLRequestRef nullRequest = 0;
> +        request = nullRequest;

Can this be done with a cast instead of creating a new local?

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list