NET-A-PORTER/scala-uri

Valid characters '+', '-' and '.' in scheme not allowed

Closed this issue · 0 comments

I stumbled upon this while implementing OAuth. I got a redirect URI to a local installed OS X app where the scheme part contains a hyphen. So I looked it up.

From RFC 3986 Section 3.1

Scheme names consist of a sequence of characters beginning with a
letter and followed by any combination of letters, digits, plus
("+"), period ("."), or hyphen ("-").

scheme      = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." )

Therefore while looking weird, the uri a1+-.://localhost should actually be valid with a scheme of a1+-. and a host-part of localhost. Yet, I get scheme = None and when I print it I get /a1+-.://localhost.

I'll attempt to provide a fix for this shortly.