Bug 137855

Summary: REGRESSION (r173356): Safari can't install a profile, gets 'Download Failed error
Product: WebKit Reporter: Antti Koivisto <koivisto>
Component: Page LoadingAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal CC: ap, commit-queue, mitz
Priority: P2 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch
none
patch 2 none

Description Antti Koivisto 2014-10-18 14:16:09 PDT
MIME type sniffing doesn't work on synthesized NSURLResponses.
Comment 1 Antti Koivisto 2014-10-18 14:16:24 PDT
<rdar://problem/18665727>
Comment 2 Antti Koivisto 2014-10-18 14:27:33 PDT
Created attachment 240069 [details]
patch
Comment 3 mitz 2014-10-18 14:45:09 PDT
Comment on attachment 240069 [details]
patch

View in context: https://bugs.webkit.org/attachment.cgi?id=240069&action=review

> Source/WebCore/platform/network/mac/ResourceResponseMac.mm:69
> +    [headerDictionary setObject:(NSString *)m_mimeType forKey:@"Content-Type"];

This can result in lying to the API client about the content of the response headers from the server. Can we use the -_setMIMEType: (which we use elsewhere in WebCore) instead?
Comment 4 mitz 2014-10-18 14:45:35 PDT
(In reply to comment #3)
> Comment on attachment 240069 [details]
> patch
> 
> View in context:
> https://bugs.webkit.org/attachment.cgi?id=240069&action=review
> 
> > Source/WebCore/platform/network/mac/ResourceResponseMac.mm:69
> > +    [headerDictionary setObject:(NSString *)m_mimeType forKey:@"Content-Type"];
> 
> This can result in lying to the API client about the content of the response
> headers from the server. Can we use the -_setMIMEType: (which we use
> elsewhere in WebCore) instead?

/the -_setMIMEType:/the -_setMIMEType: method/
Comment 5 Antti Koivisto 2014-10-18 14:53:27 PDT
> This can result in lying to the API client about the content of the response
> headers from the server. Can we use the -_setMIMEType: (which we use
> elsewhere in WebCore) instead?

We probably can.
Comment 6 Antti Koivisto 2014-10-18 15:05:28 PDT
Created attachment 240073 [details]
patch 2
Comment 7 WebKit Commit Bot 2014-10-18 15:54:19 PDT
Comment on attachment 240073 [details]
patch 2

Clearing flags on attachment: 240073

Committed r174866: <http://trac.webkit.org/changeset/174866>
Comment 8 WebKit Commit Bot 2014-10-18 15:54:22 PDT
All reviewed patches have been landed.  Closing bug.
Comment 9 Antti Koivisto 2014-10-22 13:18:53 PDT
*** Bug 137493 has been marked as a duplicate of this bug. ***