Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[WK2][NetworkSession] Add support for resuming downloads
https://bugs.webkit.org/show_bug.cgi?id=177625 <rdar://problem/34345975> Reviewed by Alex Christensen. Add support for resuming downloads for the WK2 NETWORK_SESSION code path. This was tested manually. I was unable to write an API test because our tests do not run an HTTP server and CFNetwork does not seem to generate resume data when cancelling a download over non-HTTP. * NetworkProcess/Downloads/Download.cpp: (WebKit::Download::didReceiveChallenge): (WebKit::Download::continueCanAuthenticateAgainstProtectionSpace): * NetworkProcess/Downloads/Download.h: * NetworkProcess/Downloads/DownloadManager.cpp: (WebKit::DownloadManager::continueCanAuthenticateAgainstProtectionSpace): (WebKit::DownloadManager::resumeDownload): * NetworkProcess/Downloads/cocoa/DownloadCocoa.mm: (WebKit::Download::resume): This currently includes a workaround for <rdar://problem/34745171>. We update the resume data to include the NSURLSessionResumeInfoLocalPath key with the final destination path so that CFNetwork looks for the temporary data at the right location. * NetworkProcess/cocoa/NetworkSessionCocoa.h: * NetworkProcess/cocoa/NetworkSessionCocoa.mm: (-[WKNetworkSessionDelegate URLSession:task:didReceiveChallenge:completionHandler:]): (WebKit::NetworkSessionCocoa::downloadTaskWithResumeData): * Shared/Authentication/AuthenticationManager.cpp: (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge): * Shared/Authentication/AuthenticationManager.h: Canonical link: https://commits.webkit.org/194575@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223431 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
with
156 additions
and 11 deletions.
- +36 −0 Source/WebKit/ChangeLog
- +41 −0 Source/WebKit/NetworkProcess/Downloads/Download.cpp
- +10 −0 Source/WebKit/NetworkProcess/Downloads/Download.h
- +14 −5 Source/WebKit/NetworkProcess/Downloads/DownloadManager.cpp
- +25 −2 Source/WebKit/NetworkProcess/Downloads/cocoa/DownloadCocoa.mm
- +3 −0 Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.h
- +20 −0 Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
- +2 −2 Source/WebKit/Shared/Authentication/AuthenticationManager.cpp
- +5 −2 Source/WebKit/Shared/Authentication/AuthenticationManager.h
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters