You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since we’re resolving relative to a URL whose path doesn’t end with a slash, foo shouldn’t be treated as a directory, so I think this should return the same result as for the first example above. Even if we do (incorrectly) treat foo as a directory, this result doesn’t make any sense.
I think this should return "//example.com/foo/bar/bat" (note that example.com and example.org are different; the only URI component in common is the http scheme).
This is correct but the ./ is redundant so the resulting URL is not normalized. I feel like relativeTo would be more useful if it did not insert redundant dot segments. For instance, I want to be able to relativize a URL with respect to the root URL of my application, and then iterate through segment() to route a request to the correct controller. The current implementation obliges me to do extra work to remove the dot segment :(.
The text was updated successfully, but these errors were encountered:
I think this should return
"foo/bar/bat"
(preferably) or"./foo/bar/bat"
(if you must, but see below).Since we’re resolving relative to a URL whose path doesn’t end with a slash,
foo
shouldn’t be treated as a directory, so I think this should return the same result as for the first example above. Even if we do (incorrectly) treatfoo
as a directory, this result doesn’t make any sense.I think this should return
"//example.com/foo/bar/bat"
(note thatexample.com
andexample.org
are different; the only URI component in common is thehttp
scheme).This is correct but the
./
is redundant so the resulting URL is not normalized. I feel likerelativeTo
would be more useful if it did not insert redundant dot segments. For instance, I want to be able to relativize a URL with respect to the root URL of my application, and then iterate throughsegment()
to route a request to the correct controller. The current implementation obliges me to do extra work to remove the dot segment :(.The text was updated successfully, but these errors were encountered: