This gets into the hazy zone where you have to work out whether a
"relative reference" is a "URI." RFC 3986, Section 4.1
<RFC 3986 - Uniform Resource Identifier (URI): Generic Syntax, says that an absolute
URI and a relative reference are different, but are both types of "URI
reference".
So it's correct according to spec that you can't parse a relative reference
using the URI module. However it's also true that it could be quite useful
to have a library that unifies "URI references," like you're trying to do.
Cheers
···
On 31 October 2016 at 08:44, Samuel Williams <space.ship.traveller@gmail.com > wrote:
Hi..
I feel like this should work.
$ URI.parse("/base/uri") + URI.parse("relative")
URI::BadURIError: both URI are relativeThe result should be URI with path = "/base/relative".
What do you think? Is this a bug? Or is it designed like this on purpose?
Kind regards,
Samuel
--
Matthew Kerwin
http://matthew.kerwin.net.au/