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

suggestedFilename always returns a valid filename #5019

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

Coeur
Copy link
Contributor

@Coeur Coeur commented Jul 20, 2024

The property suggestedFilename is documented with:

This method always returns a valid filename.

The default initializer init(url:mimeType:expectedContentLength:textEncodingName:) had a correct implementation, but the required init?(coder:) was unsafe.

This is the same PR as #2643 created in February 2020, but for the main branch.
This is the same PR as #2897 created in October 2020, but it was closed for being unreviewed for too long.

@parkera
Copy link
Member

parkera commented Jul 20, 2024

@swift-ci test

@parkera
Copy link
Member

parkera commented Jul 20, 2024

@jrflat to review

Copy link
Contributor

@jrflat jrflat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your work on this! I left one small nit but otherwise looks good!

Sources/FoundationNetworking/URLResponse.swift Outdated Show resolved Hide resolved
@jrflat
Copy link
Contributor

jrflat commented Sep 5, 2024

@swift-ci please test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants