Well, the reason that clean-path does not clean up URLs is that you
may want that information.  Take, as an example, FTP.
For a file on your hard drive, the path:
%/../../foo/bar/baz
is the same as:
%/foo/bar/baz
zso clean-path can clean that up without loss of information.
However, the URL:
ftp://my.domain.com/../../foo/bar/baz
may not be the same file as:
ftp://my.domain.com/foo/bar/baz
because my home directory may be in /home/me so I am really accessing
a totally different file in the two cases.  It is dangerous to play
around with paths when you could be sitting in a virtual root
directory but still with the ability to go back to the real root.

Sterling

> Hi Joel,
> 
> Not sure why clean path is limited to non urls. Why not put in a request for
> it to be modified, to [EMAIL PROTECTED] ?
> 
> In the mean time there is function to clean http paths on the Rebol Examples
> page
> http://www.rebol.com/examples.html
> 
> Clean HTTP-Path
> "To remove /../ from within HTTP URLs.
> Will remove parent directories for each /../ encountered,
> but will not remove site information."
> 
> http://www.rebol.com/examples/cleanhttp.r
> 
> 
> Cheers,
> 
> Allen K

Reply via email to