Uri for home url always forced to end in / #82
Unanswered
benmccallum
asked this question in
Q&A
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
TIL that if you have a
System.Uri
that is for the root, e.g. a path ofstring.Empty
, it will always render out from.ToString()
as"https://mydomain.com/"
. Note the trailing slash.Apparently this is to adhere to the HTTP spec, see link from the SO post.all equivalent. https://stackoverflow.com/a/46980376/725626
The spec is basically saying no slash or with slash on root is the same, but you should normalize to with the /.
My issue though is that may not be the canonical URL you'd want for a site that doesn't use trailing slashes, and I wonder if parsers of Schemas are respecting the spec...
What do you think? More just opening a discussion than logging a bug.
Beta Was this translation helpful? Give feedback.
All reactions