-
Notifications
You must be signed in to change notification settings - Fork 56
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
ZnUrl isAbsolute is dubious for file urls #71
Comments
Hi Kasper, I agree that #isAbsolute and #isRelative are not crystal clear and hence maybe not that useful. However, there is no such thing as a relative file:// reference, they are always absolute. I don't know what you are trying to do, but if you want to combine an absolute path with a relative one, I suggest you look at #withRelativeReference: which implements a process defined in an RFC (there is also a big unit test). Sven |
I highly appreciate the The situation arose in a piece of code where I have a uri, which is either file, http, or some custom scheme type, or relative uris like Feel free to close this issue if you just think I misunderstood something :-) |
Let's keep it open for a while as a reminder that maybe we need to improve something here. |
One definition of Now I am at it, I would have expected the last expression below to be true. base:= 'http://a/b/c/d' asZnUrl. rel:= '../g'.
( base withRelativeReference: rel) = (base withRelativeReference: (rel asZnUrl asString)) But in the current implementation it is not (because of the implementation of |
'file:///somepath' asZnUrl isAbsolute is false.
I would have expected it to be true.
The dubious part is the check for host in the implementation.
The text was updated successfully, but these errors were encountered: