Title: [174763] trunk/Source/WebKit2
- Revision
- 174763
- Author
- [email protected]
- Date
- 2014-10-16 08:26:14 -0700 (Thu, 16 Oct 2014)
Log Message
REGRESSION (r173356): Downloading a disk image appends ".txt" to it
https://bugs.webkit.org/show_bug.cgi?id=137493
<rdar://problem/18321947>
Reviewed by Alexey Proskuryakov.
* Shared/Downloads/ios/DownloadIOS.mm:
(WebKit::Download::startWithHandle):
* Shared/Downloads/mac/DownloadMac.mm:
(WebKit::Download::startWithHandle):
It appears that the synthesized NS/CFURLResponse fails to serialize the suggested filename correctly
unless it has been accessed first.
Modified Paths
Diff
Modified: trunk/Source/WebKit2/ChangeLog (174762 => 174763)
--- trunk/Source/WebKit2/ChangeLog 2014-10-16 13:29:55 UTC (rev 174762)
+++ trunk/Source/WebKit2/ChangeLog 2014-10-16 15:26:14 UTC (rev 174763)
@@ -1,3 +1,19 @@
+2014-10-16 Antti Koivisto <[email protected]>
+
+ REGRESSION (r173356): Downloading a disk image appends ".txt" to it
+ https://bugs.webkit.org/show_bug.cgi?id=137493
+ <rdar://problem/18321947>
+
+ Reviewed by Alexey Proskuryakov.
+
+ * Shared/Downloads/ios/DownloadIOS.mm:
+ (WebKit::Download::startWithHandle):
+ * Shared/Downloads/mac/DownloadMac.mm:
+ (WebKit::Download::startWithHandle):
+
+ It appears that the synthesized NS/CFURLResponse fails to serialize the suggested filename correctly
+ unless it has been accessed first.
+
2014-10-15 Dan Bernstein <[email protected]>
[Cocoa] "Plug-in will handle load" error isn't declared in the modern API
Modified: trunk/Source/WebKit2/Shared/Downloads/ios/DownloadIOS.mm (174762 => 174763)
--- trunk/Source/WebKit2/Shared/Downloads/ios/DownloadIOS.mm 2014-10-16 13:29:55 UTC (rev 174762)
+++ trunk/Source/WebKit2/Shared/Downloads/ios/DownloadIOS.mm 2014-10-16 15:26:14 UTC (rev 174763)
@@ -129,6 +129,10 @@
void Download::startWithHandle(ResourceHandle* handle, const ResourceResponse& response)
{
+ // FIXME: For some reason the filename needs to be accessed or it may be incorrect after
+ // CFURLResponse is serialized/deserialized (gains .txt extension)
+ response.suggestedFilename();
+
CFURLDownloadClient client;
setUpDownloadClient(client, *this);
m_download = adoptCF(CFURLDownloadCreateAndStartWithLoadingConnection(NULL, handle->releaseConnectionForDownload().get(), m_request.cfURLRequest(UpdateHTTPBody), response.cfURLResponse(), &client));
Modified: trunk/Source/WebKit2/Shared/Downloads/mac/DownloadMac.mm (174762 => 174763)
--- trunk/Source/WebKit2/Shared/Downloads/mac/DownloadMac.mm 2014-10-16 13:29:55 UTC (rev 174762)
+++ trunk/Source/WebKit2/Shared/Downloads/mac/DownloadMac.mm 2014-10-16 15:26:14 UTC (rev 174763)
@@ -73,6 +73,10 @@
ASSERT(!m_nsURLDownload);
ASSERT(!m_delegate);
+ // FIXME: For some reason the filename needs to be accessed or it may be incorrect after
+ // NSURLResponse is serialized/deserialized (gains .txt extension)
+ response.suggestedFilename();
+
m_delegate = adoptNS([[WKDownloadAsDelegate alloc] initWithDownload:this]);
m_nsURLDownload = [NSURLDownload _downloadWithLoadingConnection:handle->connection()
request:m_request.nsURLRequest(UpdateHTTPBody)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes