Skip to content

Commit

Permalink
Unreviewed build fix for r262982
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=255468
rdar://107879504

Unreviewed build fix. The delegate method expects an NSHTTPURLResponse, not an NSURLResponse.

* Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm:
(-[WKNetworkSessionDelegate URLSession:task:didReceiveInformationalResponse:]):
(-[WKNetworkSessionDelegate URLSession:task:_didReceiveInformationalResponse:]):

Canonical link: https://commits.webkit.org/262986@main
  • Loading branch information
bnham committed Apr 14, 2023
1 parent 2e76ca3 commit 2c5325e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Source/WebKit/NetworkProcess/cocoa/NetworkSessionCocoa.mm
Expand Up @@ -1033,7 +1033,7 @@ - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didFini
}
}

- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didReceiveInformationalResponse:(NSURLResponse *)response
- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didReceiveInformationalResponse:(NSHTTPURLResponse *)response
{
if (auto* networkDataTask = [self existingTask:task]) {
ASSERT(RunLoop::isMain());
Expand All @@ -1046,7 +1046,8 @@ - (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task didRece
// FIXME: Remove when rdar://108002223 can be resolved.
- (void)URLSession:(NSURLSession *)session task:(NSURLSessionTask *)task _didReceiveInformationalResponse:(NSURLResponse *)response
{
[self URLSession:session task:task didReceiveInformationalResponse:response];
if ([response isKindOfClass:[NSHTTPURLResponse class]])
[self URLSession:session task:task didReceiveInformationalResponse:(NSHTTPURLResponse *)response];
}

- (void)URLSession:(NSURLSession *)session dataTask:(NSURLSessionDataTask *)dataTask didReceiveResponse:(NSURLResponse *)response completionHandler:(void (^)(NSURLSessionResponseDisposition disposition))completionHandler
Expand Down

0 comments on commit 2c5325e

Please sign in to comment.