Changeset 174866 in webkit
- Timestamp:
- Oct 18, 2014 3:54:14 PM (10 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r174860 r174866 1 2014-10-18 Antti Koivisto <antti@apple.com> 2 3 REGRESSION (r173356): Safari can't install a profile, gets 'Download Failed error 4 https://bugs.webkit.org/show_bug.cgi?id=137855 5 6 Reviewed by Dan Bernstein. 7 8 * http/tests/mime/mime-type-sniff-expected.txt: Added. 9 * http/tests/mime/mime-type-sniff.html: Added. 10 * http/tests/mime/resources/png-with-text-content-type.cgi: Added. 11 1 12 2014-10-18 Chris Fleizach <cfleizach@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r174862 r174866 1 2014-10-18 Antti Koivisto <antti@apple.com> 2 3 REGRESSION (r173356): Safari can't install a profile, gets 'Download Failed error 4 https://bugs.webkit.org/show_bug.cgi?id=137855 5 6 Reviewed by Dan Bernstein. 7 8 We lose the sniffed MIME type for the response when synthesizing an NSURLResponse. Sniffing requires 9 backchannel data that the synthesized response doesn't have. 10 11 Test: http/tests/mime/mime-type-sniff.html 12 13 * platform/network/mac/ResourceResponseMac.mm: 14 (WebCore::ResourceResponse::initNSURLResponse): 15 16 When synthesizing NSURLResponse explicitly set the Content-type header to the sniffed type. 17 1 18 2014-10-18 Chris Dumez <cdumez@apple.com> 2 19 -
trunk/Source/WebCore/platform/network/mac/ResourceResponseMac.mm
r174747 r174866 67 67 68 68 m_nsResponse = adoptNS([[NSHTTPURLResponse alloc] initWithURL:m_url statusCode:m_httpStatusCode HTTPVersion:(NSString*)kCFHTTPVersion1_1 headerFields:headerDictionary]); 69 70 // Mime type sniffing doesn't work with a synthesized response. 71 [m_nsResponse.get() _setMIMEType:(NSString *)m_mimeType]; 69 72 } 70 73 -
trunk/Tools/ChangeLog
r174845 r174866 1 2014-10-18 Antti Koivisto <antti@apple.com> 2 3 REGRESSION (r173356): Safari can't install a profile, gets 'Download Failed error 4 https://bugs.webkit.org/show_bug.cgi?id=137855 5 6 Reviewed by Dan Bernstein. 7 8 Test and warn if the dumped response mime type differs from the platform response mime type. 9 10 * WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp: 11 (WTR::InjectedBundlePage::didReceiveResponseForResource): 12 (WTR::InjectedBundlePage::platformResponseMimeType): 13 * WebKitTestRunner/InjectedBundle/InjectedBundlePage.h: 14 * WebKitTestRunner/InjectedBundle/cocoa/InjectedBundlePageCocoa.mm: 15 (WTR::InjectedBundlePage::platformResponseMimeType): 16 1 17 2014-10-17 Joseph Pecoraro <pecoraro@apple.com> 2 18 -
trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp
r170330 r174866 1132 1132 stringBuilder.appendLiteral(" has MIME type "); 1133 1133 stringBuilder.append(toWTFString(mimeTypeString)); 1134 1135 String platformMimeType = platformResponseMimeType(response); 1136 if (!platformMimeType.isEmpty() && platformMimeType != toWTFString(mimeTypeString)) { 1137 stringBuilder.appendLiteral(" but platform response has "); 1138 stringBuilder.append(platformMimeType); 1139 } 1140 1134 1141 stringBuilder.append('\n'); 1142 1135 1143 InjectedBundle::shared().outputText(stringBuilder.toString()); 1136 1144 } … … 1868 1876 { 1869 1877 } 1878 1879 String InjectedBundlePage::platformResponseMimeType(WKURLResponseRef) 1880 { 1881 return String(); 1882 } 1870 1883 #endif 1871 1884 -
trunk/Tools/WebKitTestRunner/InjectedBundle/InjectedBundlePage.h
r168961 r174866 170 170 171 171 void platformDidStartProvisionalLoadForFrame(WKBundleFrameRef); 172 String platformResponseMimeType(WKURLResponseRef); 172 173 173 174 void frameDidChangeLocation(WKBundleFrameRef, bool shouldDump = false); -
trunk/Tools/WebKitTestRunner/InjectedBundle/cocoa/InjectedBundlePageCocoa.mm
r169869 r174866 31 31 #import <WebKit/WKBundlePagePrivate.h> 32 32 #import <WebKit/WKURLCF.h> 33 #import <WebKit/WKURLResponseNS.h> 33 34 34 35 namespace WTR { … … 49 50 } 50 51 52 String InjectedBundlePage::platformResponseMimeType(WKURLResponseRef response) 53 { 54 RetainPtr<NSURLResponse> nsURLResponse = adoptNS(WKURLResponseCopyNSURLResponse(response)); 55 return [nsURLResponse.get() MIMEType]; 56 } 57 51 58 } // namespace WTR
Note: See TracChangeset
for help on using the changeset viewer.