[TransWarp] Testing Help Needed: URL contexts

alexander smishlajev alex at ank-sia.com
Mon May 19 23:40:41 EDT 2003


Phillip J. Eby wrote:
> 
>>> I just checked in a replacement for the old URL parsing mechanisms in 
>>> PEAK, and I could really use some help with validating that the 
>>> existing supported schemes are parsed correctly by the current CVS 
>>> version of PEAK.
>>
>> FileURL does incorrectrly handle relative paths.
> 
> Technically, a relative path is not a valid 'file:' URL

isn't it?  as far as i understand rfc 1808, 'file:egg;trim?warning#body' 
is perfectly valid relative url.

> The correct mechanism for relative paths to use is a relative URI, not a 
> schemed URI.  In other words href="./egg?warning" is a valid relative 
> URI href, but href="file:./egg?warning" is invalid.

then, how will it be possible to specify a 'logfile:' (or 'lockfile:', 
or any other file-related) scheme?

>> the first two examples are formatted differently from original source 
>> (formatting always adds "//" after the scheme component), but i am not 
>> sure if this may be called "incorrect formatting" since the url 
>> meaning does not change.
> 
> Actually, the URLs you gave are not quite correct, because '//' at the 
> beginning of a file URL is an indication that a *hostname* follows.

you're right.  so the second pair of urls i've sent is plain invalid, 
but for the first pair URL formatting invalidates the locator.

best wishes,
alex.





More information about the PEAK mailing list