New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

`file://` URIs not parsed correctly #158

Closed
ghost opened this Issue Aug 1, 2014 · 3 comments

Comments

Projects
None yet
1 participant
@ghost

ghost commented Aug 1, 2014

As per the RFC, this Wikipedia page and this StackOverflow entry file:// URIs can have a hostname in them. Currently URIjs completely ignores hosts in any file protocol URI.

eg.
URI('file://localhost/C:/somefile.txt').hostname() === ''
URI('http://localhost/C:/somefile.txt').hostname() === 'localhost'

The only case in which hostname should be empty is when supplied file:/// URIs in which case the host is literally empty.

@rodneyrehm

This comment has been minimized.

Show comment
Hide comment
@rodneyrehm

rodneyrehm Aug 1, 2014

Member

I can pinpoint this to URI.parse(). If you want to tackle this (and send a PR), please make sure you run / extend the tests accordingly.

I might get to this either early next week, or in 2 weeks time.

Member

rodneyrehm commented Aug 1, 2014

I can pinpoint this to URI.parse(). If you want to tackle this (and send a PR), please make sure you run / extend the tests accordingly.

I might get to this either early next week, or in 2 weeks time.

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Aug 1, 2014

Thanks @rodneyrehm. There is no real "rush" to get this fixed, just thought I'd point it out. I'll see if I can get a PR together!

ghost commented Aug 1, 2014

Thanks @rodneyrehm. There is no real "rush" to get this fixed, just thought I'd point it out. I'll see if I can get a PR together!

@rodneyrehm rodneyrehm added the Bug label Aug 20, 2014

rodneyrehm added a commit that referenced this issue Aug 20, 2014

@rodneyrehm rodneyrehm closed this Aug 20, 2014

@ghost

This comment has been minimized.

Show comment
Hide comment

ghost commented Aug 22, 2014

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment