Closed
Bug 1201079
Opened 9 years ago
Closed 9 years ago
Stop appending a forward slash to every URL
Categories
(Firefox for iOS :: General, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: aaronmt, Assigned: st3fan)
Details
Attachments
(2 files)
Every URL has a superfluous forward slash shown in the address-bar.
Comment 1•9 years ago
|
||
This is because we dump the URL directly, which has the path. We might be able to simplify.
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → sarentz
Assignee | ||
Comment 2•9 years ago
|
||
This patch makes sure that we do not display a trailing slash for an `NSURL` that has an empty (`/`) or `nil` path component.
If the `NSURL` contains a non-empty path that ends with a trailing slash then we do not do anything. This is because that will actually result in a different URL. So for example `http://www.apple.com/iphone/` will not be changed. This is the same as *Firefox Desktop* handles it.
I have merged this logic in `absoluteStringWithoutHTTPScheme`, which is called by the `BrowserLocationView.updateTextWithURL()` to update the currently displayed URL. Because this now does more than just remove the `http://` part, I have renamed that function to `absoluteDisplayString`.
Also included tests to make sure this works on URLs with and without trailing slashes with both empty and non-empty path compoments.
Attachment #8658422 -
Flags: review?(bnicholson)
Attachment #8658422 -
Flags: feedback?(aaron.train)
Assignee | ||
Updated•9 years ago
|
Attachment #8658422 -
Flags: review?(sleroux)
Comment 3•9 years ago
|
||
Comment on attachment 8658422 [details] [review]
PR: https://github.com/mozilla/firefox-ios/pull/1046
LGTM
Attachment #8658422 -
Flags: review?(bnicholson) → review+
Assignee | ||
Updated•9 years ago
|
Status: NEW → ASSIGNED
Comment 4•9 years ago
|
||
Comment on attachment 8658422 [details] [review]
PR: https://github.com/mozilla/firefox-ios/pull/1046
LGTM
Attachment #8658422 -
Flags: review?(sleroux) → review+
Assignee | ||
Updated•9 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Reporter | ||
Comment 5•9 years ago
|
||
Still see this on master (89db3d3)
Test URLs: aaronmt.com, polygon.com, ip9.com
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Reporter | ||
Comment 6•9 years ago
|
||
(In reply to Aaron Train [:aaronmt] from comment #5)
> Still see this on master (89db3d3)
>
> Test URLs: aaronmt.com, polygon.com, ip9.com
Ok, just noticed this landed on 'v1.0'. I'll check back again.
Status: REOPENED → RESOLVED
Closed: 9 years ago → 9 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 7•9 years ago
|
||
Same as https://github.com/mozilla/firefox-ios/pull/1046 but converted to Swift 2.0 for the master branch.
Attachment #8658796 -
Flags: review?
Comment 8•9 years ago
|
||
Comment on attachment 8658796 [details] [review]
PR: https://github.com/mozilla/firefox-ios/pull/1051
Usually safe to just land these uplifts without additional review (unless rebasing required significant changes).
Attachment #8658796 -
Flags: review? → review+
Reporter | ||
Comment 9•9 years ago
|
||
https://github.com/mozilla/firefox-ios/pull/1051 still not merged?
I see this on master still
Flags: needinfo?(sarentz)
Flags: needinfo?(bnicholson)
Comment 10•9 years ago
|
||
Reporter | ||
Updated•8 years ago
|
Attachment #8658422 -
Flags: feedback?(aaron.train)
You need to log in
before you can comment on or make changes to this bug.
Description
•