summaryrefslogtreecommitdiffstats
path: root/contrib/python
diff options
context:
space:
mode:
authorrobot-piglet <[email protected]>2026-06-03 09:42:07 +0300
committerrobot-piglet <[email protected]>2026-06-03 10:32:53 +0300
commit540ee6db1ae01a040b3e42a2252e8cc3c4dde952 (patch)
treecd1484f8973fdcc63154676125bd7b0be608a417 /contrib/python
parent93595477b47e6a223aa8a200571049de76c16082 (diff)
Intermediate changes
commit_hash:01c4cf5931fb1ed85a1590353f76ba93ceb7c8da
Diffstat (limited to 'contrib/python')
-rw-r--r--contrib/python/Werkzeug/py3/patches/06-pr2997-ipv6-server-name.patch13
-rw-r--r--contrib/python/Werkzeug/py3/werkzeug/sansio/utils.py3
2 files changed, 16 insertions, 0 deletions
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]}"