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

urlResolve pathname fix for file protocol + windows should be moved to location #5041

Closed
jeffbcross opened this issue Nov 19, 2013 · 0 comments
Assignees

Comments

@jeffbcross
Copy link
Contributor

The private urlResolve method was recently patched to strip the drive name from path names on windows when using the file protocol.

f925e8c
89f435d

While this fix was necessary to make the $location service work correctly with the file protocol on windows, the fix should be implemented in $location instead of in urlResolve. The low-level behavior is actually desirable given that the notion of relative paths in the file protocol is not legitimate, and the urlResolve method should not be very opinionated on how its properties are used by different angular services.

@ghost ghost assigned jeffbcross Nov 22, 2013
jeffbcross added a commit to jeffbcross/angular.js that referenced this issue Nov 27, 2013
The urlResolve method was fixed to automatically remove the
volume label from path names to fix issues with the file
protocol on windows where $location.path() was returning
paths where the first segment would be the volume name,
such as "/C:/mypath". See angular#4942 and angular#4928

However, the solution was specific to the $location non-
HTML5 mode, and was implemented at a lower level of
abstraction than it should have been. This refactor moves
the fix to inside of the LocationHashBangUrl $$parse method.

Closes angular#5041
jamesdaily pushed a commit to jamesdaily/angular.js that referenced this issue Jan 27, 2014
The urlResolve method was fixed to automatically remove the
volume label from path names to fix issues with the file
protocol on windows where $location.path() was returning
paths where the first segment would be the volume name,
such as "/C:/mypath". See angular#4942 and angular#4928

However, the solution was specific to the $location non-
HTML5 mode, and was implemented at a lower level of
abstraction than it should have been. This refactor moves
the fix to inside of the LocationHashBangUrl $$parse method.

Closes angular#5041
jamesdaily pushed a commit to jamesdaily/angular.js that referenced this issue Jan 27, 2014
The urlResolve method was fixed to automatically remove the
volume label from path names to fix issues with the file
protocol on windows where $location.path() was returning
paths where the first segment would be the volume name,
such as "/C:/mypath". See angular#4942 and angular#4928

However, the solution was specific to the $location non-
HTML5 mode, and was implemented at a lower level of
abstraction than it should have been. This refactor moves
the fix to inside of the LocationHashBangUrl $$parse method.

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

Successfully merging a pull request may close this issue.

1 participant