Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

url.parse fails on file protocol #562

Closed
tmcw opened this issue Jan 14, 2011 · 2 comments
Closed

url.parse fails on file protocol #562

tmcw opened this issue Jan 14, 2011 · 2 comments

Comments

@tmcw
Copy link

tmcw commented Jan 14, 2011

URLs with the file:// protocol aren't correctly parsed - the pathname contains the hostname and pathname, including the // after file. This is, at least, in conflict with the Python implementation, which claims to comply with the URL RFC.

@ryanpetrello
Copy link

I'm also experiencing this bug.

@ryanpetrello
Copy link

I've written a patch for this and submitted a pull request to Joyent:

#1078

Hopefully this will get pulled into an upcoming release and resolved.

isaacs pushed a commit to isaacs/node-v0.x-archive that referenced this issue May 27, 2011
The file:// protocol *always* has a hostname; it's frequently
abbreviated as an empty string, which represents 'localhost'
implicitly.

According to RFC 1738 (http://tools.ietf.org/html/rfc1738):

A file URL takes the form:

   file://<host>/<path>

where <host> is the fully qualified domain name of the system on
which the <path> is accessible...

As a special case, <host> can be the string "localhost" or the empty
string; this is interpreted as 'the machine from which the URL is
being interpreted'.
@isaacs isaacs closed this as completed in 58a1d7e May 27, 2011
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants