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

URL: Fix resolving from non-file to file URLs. #14146

Closed
wants to merge 1 commit into from

Conversation

jagoda
Copy link

@jagoda jagoda commented Mar 26, 2015

When resolving a reference URL with the 'file' scheme an no host
against a base URL without the 'file' scheme, the first path element
of the reference URL is used as the host for the target URL. This
results in an invalid target URL.

This change makes an exception for file URLs so that the host is not
mangled during URL resolution.

@jagoda
Copy link
Author

jagoda commented Mar 26, 2015

I believe this issue is also present in v0.10.

@jasnell
Copy link
Member

jasnell commented Aug 27, 2015

@jagoda ... I know it's been a while, but can you please update this to match what was landed in nodejs/node#1277. I'd like to go ahead and land this in v0.12 but need the same style fixes made.

When resolving a reference URL with the 'file' scheme an no host
against a base URL without the 'file' scheme, the first path element
of the reference URL is used as the host for the target URL. This
results in an invalid target URL.

This change makes an exception for file URLs so that the host is not
mangled during URL resolution.
@jagoda
Copy link
Author

jagoda commented Aug 29, 2015

@jasnell I think this should be good to go now.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants