aboutsummaryrefslogtreecommitdiff
path: root/dev-python/multipart/files/multipart-urlencoded-test.patch
diff options
context:
space:
mode:
authorJulien Roy <julien@jroy.ca>2023-02-05 00:27:30 -0500
committerJulien Roy <julien@jroy.ca>2023-02-05 00:27:30 -0500
commit94fdb74ebd1957c8bcae88829095d24271834643 (patch)
tree9535749fda6340cf00873e193619cfee525da624 /dev-python/multipart/files/multipart-urlencoded-test.patch
parent581b5abca73f0a1a7909c2b070f4b2970c1e68b3 (diff)
downloadMrRoy-Overlay-94fdb74ebd1957c8bcae88829095d24271834643.tar.gz
MrRoy-Overlay-94fdb74ebd1957c8bcae88829095d24271834643.tar.bz2
MrRoy-Overlay-94fdb74ebd1957c8bcae88829095d24271834643.zip
dev-python/multipart: new package, add 0.2.4
Signed-off-by: Julien Roy <julien@jroy.ca>
Diffstat (limited to 'dev-python/multipart/files/multipart-urlencoded-test.patch')
-rw-r--r--dev-python/multipart/files/multipart-urlencoded-test.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/dev-python/multipart/files/multipart-urlencoded-test.patch b/dev-python/multipart/files/multipart-urlencoded-test.patch
new file mode 100644
index 0000000..e47f692
--- /dev/null
+++ b/dev-python/multipart/files/multipart-urlencoded-test.patch
@@ -0,0 +1,35 @@
+From 4d4ac6b79c453918ebf40c690e8d57d982ee840b Mon Sep 17 00:00:00 2001
+From: Colin Watson <cjwatson@debian.org>
+Date: Fri, 9 Apr 2021 16:54:49 +0100
+Subject: [PATCH] Don't test semicolon separators in urlencoded data
+
+Python no longer accepts ";" as a separator for `urllib.parse.parse_qs`
+by default (https://bugs.python.org/issue42967), causing the multipart
+test suite to fail with recent Python versions (3.6.13, 3.7.10, 3.8.8,
+3.9.2, 3.10.0a6).
+
+While we could detect the availability of the `separator` argument and
+pass it, since `application/x-www-form-urlencoded` data in `POST` and
+`PUT` requests is probably not an issue for web cache poisoning, the
+current HTML spec seems clear that only "&" should be considered, so
+follow along with Python's API change.
+---
+ test/test_multipart.py | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/test/test_multipart.py b/test/test_multipart.py
+index 38c69d1..6fe864f 100644
+--- a/test/test_multipart.py
++++ b/test/test_multipart.py
+@@ -233,10 +233,9 @@ def test_empty(self):
+ def test_urlencoded(self):
+ for ctype in ('application/x-www-form-urlencoded', 'application/x-url-encoded'):
+ self.env['CONTENT_TYPE'] = ctype
+- forms, files = self.parse('a=b&c=d;e=f')
++ forms, files = self.parse('a=b&c=d')
+ self.assertEqual(forms['a'], 'b')
+ self.assertEqual(forms['c'], 'd')
+- self.assertEqual(forms['e'], 'f')
+
+ def test_urlencoded_latin1(self):
+ for ctype in ('application/x-www-form-urlencoded', 'application/x-url-encoded'):