Closed
Description
Previous ID | SR-11673 |
Radar | None |
Original Reporter | shad0wdev (JIRA User) |
Type | Bug |
Status | Resolved |
Resolution | Done |
Attachment: Download
Environment
Ubuntu 18.04, 16.04
macOS Mojave
Swift 5.0 - 5.1 and master branch
Additional Detail from JIRA
Votes | 0 |
Component/s | Foundation |
Labels | Bug, Linux |
Assignee | @spevans |
Priority | Medium |
md5: 62ca5b243957439bdbba7fbc7011d979
Issue Description:
Issue:
When trying to download file with URLSession, it merges HTML from redirect page (with all redirect codes - 301, 302, 307, 308) with data received from correct page (with code 200). This happens only on Linux platftorms and not on macOS.
How to reproduce:
-
Be on Linux
-
Use URL with any redirect code leading to any page with proper content you want to receive
-
Use any URLSession with any configuration
-
Use URLSession dataTask() method
I've written simple tests with simple Data(contentsOf: ) method, URLSession dataTask and downloadTask. They're in attachments.