-
Notifications
You must be signed in to change notification settings - Fork 236
Open
Description
If you create a URI object without a path (e.g. only with query string or fragment identifier), directory and file are not set to the current dir and file name.
// window.location: http://example.com/a/b/c
var uri = new URI('?foo=bar')
uri.get('scheme') // expected: "http" actual: "http"
uri.get('host') // expected: "example.com" actual: "example.com"
uri.get('directory') // expected: "/a/b/" actual: "/"
uri.get('file') // expected: "c" actual: ""
If I read RFC 3986 correctly it should fall back to the current URI.
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/35995455-relative-uri-has-wrong-directory-and-file-values?utm_campaign=plugin&utm_content=tracker%2F22069&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F22069&utm_medium=issues&utm_source=github).Metadata
Metadata
Assignees
Labels
No labels