raku-community-modules / URI

Raku realization of URI — Uniform Resource Identifiers handler
Artistic License 2.0
3 stars 14 forks source link

Return an empty scheme rather than dieing. #13

Closed jonathanstowe closed 9 years ago

jonathanstowe commented 9 years ago

In a number of places you may not know in advance whether you are going to get a relative or fully qualified URI, this saves checking a "safe" method before attempting to to use the scheme.

ronaldxs commented 9 years ago

That's odd. The library fix is for a scheme but the test is for a port. It sort of works but seems a little obscure. Why don't you do the test for the scheme too?

jonathanstowe commented 9 years ago

Because in the absence of a port in the parsed URI it uses the scheme to get the default port :) Testing it like kills two birds with one stone and is also the reason that I found it in the first place.