You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This only occurs when using a completionHandler-based task. If the task is created without a completionHandler, the delegate method is called.
On Darwin platforms, however, the delegate method is called in both cases.
Steps to reproduce:
I've included a simple Node.js HTTP server to demonstrate the issue.
Attachment: Download
Environment
macOS:
Swift 5.2.4 (Xcode 11.5)
Linux:
Swift 5.2.4 docker image
Additional Detail from JIRA
md5: 722661d520eea8c76e9fd65692e87838
Issue Description:
When the swift-corelibs-foundation version of URLSession encounters a redirect, it does not call the appropriate delegate method:
This only occurs when using a completionHandler-based task. If the task is created without a completionHandler, the delegate method is called.
On Darwin platforms, however, the delegate method is called in both cases.
Steps to reproduce:
I've included a simple Node.js HTTP server to demonstrate the issue.
Use URLSession to request a URL:
http://localhost:8989/first
The server will redirect from /first to /second.
Expected result:
The `willPerformHTTPRedirection` delegate method is called when URLSession performs a completionHandler-based task that results in a redirect.
Actual result:
Darwin:
The delegate method is called.
Linux:
The delegate method is not called.
The text was updated successfully, but these errors were encountered: