Skip to content

Fix failure in setter for NSURLComponents.port #300

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

Merged
merged 1 commit into from
Mar 24, 2016

Conversation

seabaylea
Copy link
Contributor

Once you've created a NSURLComponents object, setting the port value has no effect. This is caused by why looks like a copy/paste issue in _CFURLComponentsSetPort where the code is calling _passwordComponentValid rather than _portComponentValid

I've fixed this, and added a test for the setter. Note that the test case sets the expected string explicitly rather than concatenating the urlString and the port value. This is because of the issue that PR #296 fixes - when converting the port to a string it currently localises it into 8,080.

@parkera parkera merged commit 4b7ee5a into swiftlang:master Mar 24, 2016
@parkera
Copy link
Contributor

parkera commented Mar 24, 2016

Thanks!

@seabaylea seabaylea deleted the NSURLComponent branch March 25, 2016 07:43
atrick pushed a commit to atrick/swift-corelibs-foundation that referenced this pull request Jan 12, 2021
[logging] Avoid logging cancellation as warnings/errors
kateinoigakukun pushed a commit to kateinoigakukun/swift-corelibs-foundation that referenced this pull request Oct 11, 2023
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.

2 participants