Sean,

The scheme is not optional, it defines what (kind) the URL is. You are 
expecting behaviour such as in a browser's address bar. But there, there is 
context (you are expecting an HTTP URL).

What you are looking for is provided:

  ZnUrl fromString: 'www.host.com' defaultScheme: #http

Are you reading the specs differently ?

Sven

> On 12 Mar 2015, at 21:21, Sean P. DeNigris <[email protected]> wrote:
> 
> 'http://www.hm.com' asUrl host = 'www.hm.com'.
> All good so far, but:
>  'www.hm.com' asUrl host = nil.
>  'www.hm.com' asUrl segments = an OrderedCollection('www.hm.com')
> 
> I realize presenting a URL without a scheme is kind of vague, but the least
> surprising thing to me would be to interpret schemeless URLs as starting
> with the authority. After all, most people commonly use "www.hm.com" as a
> shorthand for "http://www.hm.com";
> 
> 
> 
> -----
> Cheers,
> Sean
> --
> View this message in context: 
> http://forum.world.st/ZnUrl-Constructing-without-Scheme-tp4811576.html
> Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.
> 


Reply via email to