diff --git a/python-ecosys/requests/requests/__init__.py b/python-ecosys/requests/requests/__init__.py index 4ca7489a..93671230 100644 --- a/python-ecosys/requests/requests/__init__.py +++ b/python-ecosys/requests/requests/__init__.py @@ -73,6 +73,14 @@ def request( port = 443 else: raise ValueError("Unsupported protocol: " + proto) + + if "?" in host: + host, _path = host.split("?", 1) + path = "?" + _path + path + + if "#" in host: + host, _path = host.split("#", 1) + path = "#" + _path + path if ":" in host: host, port = host.split(":", 1)