[Q] Isn't 'file://foo/bar' asUrl supposed to give a relative FileUrl?

Andreas Raab andreas.raab at gmx.de
Mon Aug 18 16:40:51 UTC 2003


Hi,

> >>none of the discussed problems are an issue.
> >>E.g., 'g' asUrl -> http://g/  is one of these smart things 
> >>that are just plain incorrect.
> 
> > What do you mean by incorrect?  This behavior is correct 
> > according to the letter of the RFC's, because the input
> > is invalid to begin with.
> 
> See above. The input is perfectly valid for a relative URI. 
> This above behavior is one of the "smart" actions that actually
> get in the way.

Seems to me that #asUrl then really is overloaded in its meaning. E.g., it
looks as if adding something like #asAbsoluteUrl might be appropriate with
the meaning of "I don't care what's in there just resolve it". Which would
then give us

'g/' asAbsoluteUrl -> http://g/
'g/' asUrl relativeTo: 'file://data/test' asUrl -> file://data/test/g

etc.

Cheers,
  - Andreas



More information about the Squeak-dev mailing list