29 lines
982 B
Diff
29 lines
982 B
Diff
From a06c05cd4bba292ee26e3e9116cff902e0440b52 Mon Sep 17 00:00:00 2001
|
|
From: Ben Kallus <49924171+kenballus@users.noreply.github.com>
|
|
Date: Wed, 8 Feb 2023 15:19:07 +0000
|
|
Subject: [PATCH] Fix _idna_encode handling of '\x80'
|
|
|
|
Co-authored-by: Illia Volochii <illia.volochii@gmail.com>
|
|
|
|
Conflict:1.The content of "@@" is adapted 2.The line number is adapted
|
|
Reference:https://github.com/urllib3/urllib3/commit/a06c05cd4bba292ee26e3e9116cff902e0440b52
|
|
---
|
|
src/urllib3/util/url.py | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/src/urllib3/util/url.py b/src/urllib3/util/url.py
|
|
index 63166e8..8bac93a 100644
|
|
--- a/src/urllib3/util/url.py
|
|
+++ b/src/urllib3/util/url.py
|
|
@@ -300,7 +300,7 @@ def _normalize_host(host, scheme):
|
|
|
|
|
|
def _idna_encode(name):
|
|
- if name and any([ord(x) > 128 for x in name]):
|
|
+ if name and any(ord(x) >= 128 for x in name):
|
|
try:
|
|
import idna
|
|
except ImportError:
|
|
--
|
|
2.27.0
|
|
|