Correctly represent scheme- (protocol-) relative URI.
amcgregor opened this issue · 1 comments
amcgregor commented
As utilized frequently in HTML for external asset references, URI such as the following should be an identity transform:
//example.com/protocol/relative
amcgregor commented
repr
hides the //
, resolution fails gloriously.
>>> a = URI("https://eaxx.co/protocol/specific"); a
URI('https://eaxx.co/protocol/specific')
>>> b = URI("//example.com/protocol/relative"); b
URI('example.com/protocol/relative')
>>> b.relative
True
>>> a.resolve(b)
URI('https://eaxx.co/protocol/example.com/protocol/relative')