Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-12892] Data(contentsOf:) does not follow redirects on Linux #3254

Closed
MaxDesiatov opened this issue May 27, 2020 · 2 comments
Closed

[SR-12892] Data(contentsOf:) does not follow redirects on Linux #3254

MaxDesiatov opened this issue May 27, 2020 · 2 comments

Comments

@MaxDesiatov
Copy link
Member

Previous ID SR-12892
Radar None
Original Reporter @MaxDesiatov
Type Bug
Status Closed
Resolution Duplicate
Environment

Swift 5.2.3 on Linux (Docker SHA 67a9c8f156c1) and Xcode 11.5 on macOS with Apple Swift version 5.2.4 (swiftlang-1103.0.32.9 clang-1103.0.32.53)

Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug
Assignee None
Priority Medium

md5: 5f3b4d78f7933e5296ec8ff813f93466

duplicates:

  • SR-12439 Incomplete file download on Ubuntu

Issue Description:

Run this snippet on macOS and Linux:

import Foundation
import FoundationNetworking

let largeStrings = URL(string: "https://github.com/SheetJS/test_files/raw/master/large_strings.xls")!

let data = try Data(contentsOf: largeStrings)

On macOS this downloads the file correctly, while on Linux this downloads a redirect body with this content:

<html><body>You are being <a href="https://raw.githubusercontent.com/SheetJS/test_files/master/large_strings.xls">redirected</a>.</body></html>

@LucianoPAlmeida
Copy link
Contributor

Hey @MaxDesiatov, I think this is a dupe of SR-12439, that is reported resolved 🙂

@MaxDesiatov
Copy link
Member Author

@LucianoPAlmeida awesome, thanks!

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@shahmishal shahmishal transferred this issue from apple/swift May 5, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants