mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
#14072: Fix parsing of tel URIs in urlparse by making the check for ports stricter.
This commit is contained in:
parent
5fa4a89601
commit
6709b7d5d1
3 changed files with 16 additions and 6 deletions
|
@ -806,6 +806,13 @@ class UrlParseTestCase(unittest.TestCase):
|
|||
encoding='utf-8')
|
||||
self.assertRaises(TypeError, urllib.parse.quote, b'foo', errors='strict')
|
||||
|
||||
def test_issue14072(self):
|
||||
p1 = urllib.parse.urlsplit('tel:+31-641044153')
|
||||
self.assertEqual(p1.scheme, 'tel')
|
||||
self.assertEqual(p1.path, '+31-641044153')
|
||||
p2 = urllib.parse.urlsplit('tel:+31641044153')
|
||||
self.assertEqual(p2.scheme, 'tel')
|
||||
self.assertEqual(p2.path, '+31641044153')
|
||||
|
||||
def test_main():
|
||||
support.run_unittest(UrlParseTestCase)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue