Add some chars (!, =, etc) as allowed to the userinfo part of authority

As per https://tools.ietf.org/html/rfc3986#section-3.2.1
userinfo    = *( unreserved / pct-encoded / sub-delims / ":" )

Where, according to https://tools.ietf.org/html/rfc3986#section-2.2 ,
sub-delims  = "!" / "$" / "&" / "'" / "(" / ")"
                  / "*" / "+" / "," / ";" / "="

The sub-delims and pct-encoded sets were added in this commit
This commit is contained in:
Kostya Esmukov 2017-07-02 21:13:11 +03:00
parent 028d1db0b4
commit ae5fc8b0f5
No known key found for this signature in database
GPG Key ID: 2D3B9C1712FF84F7
1 changed files with 3 additions and 1 deletions

View File

@ -132,7 +132,9 @@ HOST_RE = HOST_PATTERN = '({0}|{1}|{2})'.format(
IPv4_RE,
IP_LITERAL_RE,
)
USERINFO_RE = '^[A-Za-z0-9_.~\-%:]+'
USERINFO_RE = '^([' + UNRESERVED_RE + SUB_DELIMITERS_RE + ':]|%s)+' % (
PCT_ENCODED
)
PORT_RE = '[0-9]{1,5}'
# ####################