on-internet
← Community

Url Format: Empty Path

Stack Overflow ·

I have questions regarding the URL path format. A url has a authority and a path. Now the question here is what is with an empty path (no path segments). The following is considered. The leading slash is part of the path. '/' is a path in http.//domain/ A empty path is actually a segment with a empty string as name "". Those two assumption would lead to the following results: A. http.//domain?query, http.//domain#fraction, http.//domain would be legal URL strings B. The following domain path would be extracted for the given domains. http.//domain -> segments = {} http.//domain/ -> segments = {

Comments

Sign in or sign up to comment and upvote.

No comments yet.