Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 81926 - httplib does not support IPv6
Summary: httplib does not support IPv6
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: python
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Mihai Ibanescu
QA Contact: Brock Organ
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-01-15 09:32 UTC by Ulrich Drepper
Modified: 2007-04-18 16:50 UTC (History)
0 users

Fixed In Version: 2.4.2-3.2.1
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-05-27 17:51:46 UTC


Attachments (Terms of Use)

Description Ulrich Drepper 2003-01-15 09:32:11 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3b) Gecko/20030111

Description of problem:
IPv6 addresses in URIs have to be written like

   http://[fe80::207:e9ff:fe9b]:8000

but passing such a string to the httplib functions produces errors like

  File "//usr/lib/python2.2/httplib.py", line 969, in __init__
    self._setup(self._connection_class(host, port, strict))
  File "//usr/lib/python2.2/httplib.py", line 491, in __init__
    self._set_hostport(host, port)
  File "//usr/lib/python2.2/httplib.py", line 502, in _set_hostport
    raise InvalidURL("nonnumeric port: '%s'" % host[i+1:])
httplib.InvalidURL: nonnumeric port: ':207:e9ff:fe9b]:8000'


Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1.start python
2.run the script
import xmlrpclib
server = xmlrpclib.Server("http://fe80::207:e9ff:fe9b:8000")
server.echo("test")

It's not necessary to have a server running, you'll not get as far as using it.
    

Actual Results:  Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "//usr/lib/python2.2/xmlrpclib.py", line 821, in __call__
    return self.__send(self.__name, args)
  File "//usr/lib/python2.2/xmlrpclib.py", line 975, in __request
    verbose=self.__verbose
  File "//usr/lib/python2.2/xmlrpclib.py", line 833, in request
    h = self.make_connection(host)
  File "//usr/lib/python2.2/xmlrpclib.py", line 862, in make_connection
    return httplib.HTTP(host)
  File "//usr/lib/python2.2/httplib.py", line 969, in __init__
    self._setup(self._connection_class(host, port, strict))
  File "//usr/lib/python2.2/httplib.py", line 491, in __init__
    self._set_hostport(host, port)
  File "//usr/lib/python2.2/httplib.py", line 502, in _set_hostport
    raise InvalidURL("nonnumeric port: '%s'" % host[i+1:])
httplib.InvalidURL: nonnumeric port: ':207:e9ff:fe9b]:8000'


Expected Results:  connection to xmlrpc server

Additional info:

See RFC 2732 for info on IPv6 URIs.

Comment 1 Mihai Ibanescu 2003-01-15 15:11:43 UTC
I'll have to check if there is any statement python 2.2 would be IPv6 compliant,
anywhere. Will send upstream.

Comment 2 Ulrich Drepper 2003-11-06 05:00:09 UTC
Looking at the report again, the URL is wrong.  Replace the second
line in the script from the receipe with

server = xmlrpclib.Server("http://[fe80::207:e9ff:fe9b]:8000")

Result is still the same (with python-2.2.3-7).

Comment 3 Ulrich Drepper 2006-05-27 17:51:46 UTC
This specific issue seems to be fixed in 2.4.2-3.2.1 and maybe earlier.


Note You need to log in before you can comment on or make changes to this bug.