diff options
Diffstat (limited to 'dev-python/urllib3/files')
-rw-r--r-- | dev-python/urllib3/files/urllib3-1.26.2-byteswarning.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/dev-python/urllib3/files/urllib3-1.26.2-byteswarning.patch b/dev-python/urllib3/files/urllib3-1.26.2-byteswarning.patch new file mode 100644 index 000000000000..dfa761c5631e --- /dev/null +++ b/dev-python/urllib3/files/urllib3-1.26.2-byteswarning.patch @@ -0,0 +1,25 @@ +From bab9ca9f7148d6a7f15b83cfa1126bf1c8ceb17d Mon Sep 17 00:00:00 2001 +From: Quentin Pradet <quentin@pradet.me> +Date: Tue, 26 Jan 2021 18:04:17 +0400 +Subject: [PATCH] Don't compare bytes and str in putheader() + +--- + src/urllib3/connection.py | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/urllib3/connection.py b/src/urllib3/connection.py +index 660d679c..387f3770 100644 +--- a/src/urllib3/connection.py ++++ b/src/urllib3/connection.py +@@ -215,7 +215,7 @@ class HTTPConnection(_HTTPConnection, object): + + def putheader(self, header, *values): + """""" +- if SKIP_HEADER not in values: ++ if not any(isinstance(v, str) and v == SKIP_HEADER for v in values): + _HTTPConnection.putheader(self, header, *values) + elif six.ensure_str(header.lower()) not in SKIPPABLE_HEADERS: + raise ValueError( +-- +2.30.0 + |