commit | cae14d2714f363445d8ac0d631dc102b0ef292a9 | [log] [tgz] |
---|---|---|
author | Skip Montanaro <skip@pobox.com> | Tue Sep 14 17:55:21 2004 +0000 |
committer | Skip Montanaro <skip@pobox.com> | Tue Sep 14 17:55:21 2004 +0000 |
tree | 01e8a066d6fe02f635df0d79cb08302635630aab | |
parent | 1fd00a1b7185a6bfb575e3ca0303e5fdc9d24498 [diff] [blame] |
missed the obvious test case and corresponding fix
diff --git a/Lib/httplib.py b/Lib/httplib.py index 2f117d8..b7276af 100644 --- a/Lib/httplib.py +++ b/Lib/httplib.py
@@ -525,7 +525,8 @@ def _set_hostport(self, host, port): if port is None: i = host.rfind(':') - if i >= 0: + j = host.rfind(']') # ipv6 addresses have [...] + if i > j: try: port = int(host[i+1:]) except ValueError: