From 540ee6db1ae01a040b3e42a2252e8cc3c4dde952 Mon Sep 17 00:00:00 2001 From: robot-piglet Date: Wed, 3 Jun 2026 09:42:07 +0300 Subject: Intermediate changes commit_hash:01c4cf5931fb1ed85a1590353f76ba93ceb7c8da --- .../Werkzeug/py3/patches/06-pr2997-ipv6-server-name.patch | 13 +++++++++++++ contrib/python/Werkzeug/py3/werkzeug/sansio/utils.py | 3 +++ 2 files changed, 16 insertions(+) create mode 100644 contrib/python/Werkzeug/py3/patches/06-pr2997-ipv6-server-name.patch (limited to 'contrib/python') diff --git a/contrib/python/Werkzeug/py3/patches/06-pr2997-ipv6-server-name.patch b/contrib/python/Werkzeug/py3/patches/06-pr2997-ipv6-server-name.patch new file mode 100644 index 00000000000..c5b26abbc4b --- /dev/null +++ b/contrib/python/Werkzeug/py3/patches/06-pr2997-ipv6-server-name.patch @@ -0,0 +1,13 @@ +# Backport of https://github.com/pallets/werkzeug/pull/2997 (Werkzeug 3.1.3). +--- contrib/python/Werkzeug/py3/werkzeug/sansio/utils.py (index) ++++ contrib/python/Werkzeug/py3/werkzeug/sansio/utils.py (working tree) +@@ -79,6 +79,9 @@ def get_host( + elif server is not None: + host = server[0] + ++ if ":" in host and host[0] != "[": ++ host = f"[{host}]" ++ + if server[1] is not None: + host = f"{host}:{server[1]}" + diff --git a/contrib/python/Werkzeug/py3/werkzeug/sansio/utils.py b/contrib/python/Werkzeug/py3/werkzeug/sansio/utils.py index 48ec1bfa077..c76454c222f 100644 --- a/contrib/python/Werkzeug/py3/werkzeug/sansio/utils.py +++ b/contrib/python/Werkzeug/py3/werkzeug/sansio/utils.py @@ -79,6 +79,9 @@ def get_host( elif server is not None: host = server[0] + if ":" in host and host[0] != "[": + host = f"[{host}]" + if server[1] is not None: host = f"{host}:{server[1]}" -- cgit v1.3