You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
no_proxy=fe11::/16 python -c 'import httpx; c = httpx.Client()'
it will raise:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/dist-packages/httpx/_urlparse.py", line 346, in normalize_port
port_as_int = int(port)
ValueError: invalid literal for int() with base 10: ':'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.9/dist-packages/httpx/_client.py", line 695, in __init__
self._mounts: dict[URLPattern, BaseTransport | None] = {
File "/usr/local/lib/python3.9/dist-packages/httpx/_client.py", line 696, in <dictcomp>
URLPattern(key): None
File "/usr/local/lib/python3.9/dist-packages/httpx/_utils.py", line 370, in __init__
url = URL(pattern)
File "/usr/local/lib/python3.9/dist-packages/httpx/_urls.py", line 115, in __init__
self._uri_reference = urlparse(url, **kwargs)
File "/usr/local/lib/python3.9/dist-packages/httpx/_urlparse.py", line 248, in urlparse
parsed_port: int | None = normalize_port(port, scheme)
File "/usr/local/lib/python3.9/dist-packages/httpx/_urlparse.py", line 348, in normalize_port
raise InvalidURL(f"Invalid port: {port!r}")
httpx.InvalidURL: Invalid port: ':'
httpx version: 0.27.0
The text was updated successfully, but these errors were encountered:
piamo
changed the title
Not support "no_proxy" including pattern of ipv6 prefix style
Not support "no_proxy" including value of ipv6 prefix style
Jun 12, 2024
For no_proxy=127.0.0.0/8, get_environment_proxies() will get all://127.0.0.0/8.
So, when creating a Client, in which URL class will be called, /8 will be treated as a URL path finally.
Example:
no_proxy=fe11::/16
How to reproduce:
it will raise:
httpx version:
0.27.0
The text was updated successfully, but these errors were encountered: