URIs.jl
URIs.jl copied to clipboard
Invalid port pattern is recognized in the sense of RFC3986
u = URI("//foo.com:bar")
using Test
@test u.port == "bar"
breaks the parsing of port as expected from https://www.ietf.org/rfc/rfc3986.html#section-3.2.3
The port subcomponent of authority is designated by an optional port number in decimal following the host and delimited from it by a single colon (":") character.
port = *DIGIT
The regex part is too broad @ https://github.com/JuliaWeb/URIs.jl/blob/master/src/URIs.jl#L94
AKA rfc3986 / appendix b does not conform to rfc3986 / appendix A & section 3.2.3
Yeah, this would be good to fix.