Skip to content

Commit ae5fc8b

Browse files
committed
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
1 parent 028d1db commit ae5fc8b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/rfc3986/abnf_regexp.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,9 @@
132132
IPv4_RE,
133133
IP_LITERAL_RE,
134134
)
135-
USERINFO_RE = '^[A-Za-z0-9_.~\-%:]+'
135+
USERINFO_RE = '^([' + UNRESERVED_RE + SUB_DELIMITERS_RE + ':]|%s)+' % (
136+
PCT_ENCODED
137+
)
136138
PORT_RE = '[0-9]{1,5}'
137139

138140
# ####################

0 commit comments

Comments
 (0)