NSURL: More closely align NSURL parsing with Apple's#39
Draft
will-velazquez wants to merge 11 commits intomasterfrom
Draft
NSURL: More closely align NSURL parsing with Apple's#39will-velazquez wants to merge 11 commits intomasterfrom
will-velazquez wants to merge 11 commits intomasterfrom
Conversation
Tabs->Spaces, and fix incorrectly indented `if`
This is a bit odd, but on Apple's Foundation, we keep the original path string as-is, and then percent-encode on `absoluteURL`
This leaves invalid %-encodings like %98 in the string Odd, but it's how `-[NSURL path]` behaves on Apple's Foundation
I'm not seeing the described behaviour of sometimes returning nil. If that's true for some URL's, let's please document so
For example:
```objc
NSURL *url = [NSURL URLWithString: @"sms://open?something/message-guid=aa-bb-cc;frfrfr#foobar"];
XCTAssertEqualObjects(@"sms", [url scheme]);
XCTAssertEqualObjects(@"open", [url host]);
XCTAssertEqualObjects(@"", [url path]);
XCTAssertEqualObjects(@"something/message-guid=aa-bb-cc;frfrfr", [url query]);
XCTAssertEqualObjects(@"foobar", [url fragment]);
```
Some characters are kept as %-escapes, while others are not. There's also handling for invalid %-encodings that may spring up
Author
|
|
This fixes certain file: URL's on Windows
Author
|
This seems to be affecting "sign in with google" as well |
276a05b to
3a61d74
Compare
1748252 to
72973f6
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This more closely aligns NSURL's parsing of path/query/fragment with Apple's