[Python-Dev] Re: python/dist/src/Lib httplib.py,1.88,1.89 (original) (raw)
Fredrik Lundh fredrik at pythonware.com
Sun Sep 26 14:06:30 CEST 2004
- Previous message: [Python-Dev] using openssh's pty code
- Next message: [Fwd: Re: [Python-Dev] using openssh's pty code]
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
+++ httplib.py 14 Sep 2004 17:55:21 -0000 1.89 @@ -525,7 +525,8 @@ def sethostport(self, host, port): if port is None: i = host.rfind(':') - if i >= 0: + j = host.rfind(']') # ipv6 addresses have [...] + if i > j:
one-line alternative:
i = host.find(":", host.rfind("]"))
- Previous message: [Python-Dev] using openssh's pty code
- Next message: [Fwd: Re: [Python-Dev] using openssh's pty code]
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]