Bug 137855 - REGRESSION (r173356): Safari can't install a profile, gets 'Download Failed error
Summary: REGRESSION (r173356): Safari can't install a profile, gets 'Download Failed e...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Page Loading (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
: 137493 (view as bug list)
Depends on:
Blocks:
 
Reported: 2014-10-18 14:16 PDT by Antti Koivisto
Modified: 2014-10-22 13:18 PDT (History)
3 users (show)

See Also:


Attachments
patch (7.98 KB, patch)
2014-10-18 14:27 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff
patch 2 (7.88 KB, patch)
2014-10-18 15:05 PDT, Antti Koivisto
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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. ***