mirror of
https://github.com/python/cpython.git
synced 2026-03-27 15:10:56 +00:00
Backport r59758.
Patch #1637: fix urlparse for URLs like 'http://x.com?arg=/foo'. Fix by John Nagle.
This commit is contained in:
parent
62bceeccdd
commit
81728cf4c9
1 changed files with 5 additions and 0 deletions
|
|
@ -298,6 +298,11 @@ def test_caching(self):
|
|||
self.assertEqual(type(p.hostname), type(uri))
|
||||
self.assertEqual(type(p.path), type(uri))
|
||||
|
||||
def test_noslash(self):
|
||||
# Issue 1637: http://foo.com?query is legal
|
||||
self.assertEqual(urlparse.urlparse("http://example.com?blahblah=/foo"),
|
||||
('http', 'example.com', '', '', 'blahblah=/foo', ''))
|
||||
|
||||
def test_main():
|
||||
test_support.run_unittest(UrlParseTestCase)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue