bpo-22347: Update mimetypes.guess_type to allow proper parsing of URLs (GH-15522)
https://bugs.python.org/issue22347
(cherry picked from commit 87bd2071c756188b6cd577889fb1682831142ceb)
Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
diff --git a/Lib/test/test_urllib2.py b/Lib/test/test_urllib2.py
index c6d275e..810ee5e 100644
--- a/Lib/test/test_urllib2.py
+++ b/Lib/test/test_urllib2.py
@@ -744,7 +744,7 @@
["foo", "bar"], "", None),
("ftp://localhost/baz.gif;type=a",
"localhost", ftplib.FTP_PORT, "", "", "A",
- [], "baz.gif", None), # XXX really this should guess image/gif
+ [], "baz.gif", "image/gif"),
]:
req = Request(url)
req.timeout = None