Skip to content

Commit 27e00b6

Browse files
requests: Added support for some non-standard URLs
1 parent e025c84 commit 27e00b6

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

python-ecosys/requests/requests/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ def request(
6868
port = 443
6969
else:
7070
raise ValueError("Unsupported protocol: " + proto)
71+
72+
if "?" in host:
73+
host, _path = host.split("?", 1)
74+
path = "?" + _path + path
75+
76+
if "#" in host:
77+
host, _path = host.split("#", 1)
78+
path = "#" + _path + path
7179

7280
if ":" in host:
7381
host, port = host.split(":", 1)

0 commit comments

Comments
 (0)