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-7938] URLProtectionSpace doesn't have description implemented #3680

Closed
pushkarnk opened this issue Jun 8, 2018 · 3 comments
Closed

[SR-7938] URLProtectionSpace doesn't have description implemented #3680

pushkarnk opened this issue Jun 8, 2018 · 3 comments

Comments

@pushkarnk
Copy link
Collaborator

Previous ID SR-7938
Radar None
Original Reporter @pushkarnk
Type Bug
Status Closed
Resolution Done
Environment

Linux

Additional Detail from JIRA
Votes 0
Component/s Foundation
Labels Bug
Assignee cmilr (JIRA)
Priority Medium

md5: 13b9fa32310244d1ba0d11550336f74e

Issue Description:

import Foundation
let space = URLProtectionSpace(host: "apple.com", port: 80, protocol: "http", realm: nil, authenticationMethod: "basic")
print(space)

Output on macOS:

<NSURLProtectionSpace: 0x7fa5bfea8620>: Host:apple.com, Server:http, Auth-Scheme:NSURLAuthenticationMethodDefault, Realm:(null), Port:80, Proxy:NO, Proxy-Type:(null)

Output on Linux:
<URLProtectionSpace: 0x0000557e8e182100>

@swift-ci
Copy link
Contributor

Comment by Cary Miller (JIRA)

I'm almost finished building this out, but I'm stuck on how to handle the authenticationMethod argument in the description above. In Foundation on Darwin, no matter what string I throw at it, it seems to always output:

Auth-Scheme:NSURLAuthenticationMethodDefault

I don't understand how a given input String maps to the various NSURLAuthenticationMethods, or if they even do?

Any guidance would be appreciated.

@swift-ci
Copy link
Contributor

Comment by Cary Miller (JIRA)

Nevermind, I seem to have figured it out, thanks!

@swift-ci
Copy link
Contributor

Comment by Cary Miller (JIRA)

#1607

@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