Author ndim
Recipients ndim
Date 2008-05-27.20:40:35
SpamBayes Score 0.0320376
Marked as misclassified No
Message-id <1211920837.73.0.839643919886.issue2987@psf.upfronthosting.co.za>
In-reply-to
Content
The urlparse module's ways of splitting the location into hostname and
port breaks with RFC2732 style URIs with IPv6 addresses in them:

>>> import urlparse
>>> urlparse.urlparse('http://[::1]:80/').hostname
'['
>>> urlparse.urlparse('http://[::1]:80/').port
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python2.5/urlparse.py", line 116, in port
    return int(port, 10)
ValueError: invalid literal for int() with base 10: ':1]:80'
>>> 

A simple fix is attached, but probably requires a little more thought.
History
Date User Action Args
2008-05-27 20:40:39ndimsetspambayes_score: 0.0320376 -> 0.0320376
recipients: + ndim
2008-05-27 20:40:37ndimsetspambayes_score: 0.0320376 -> 0.0320376
messageid: <1211920837.73.0.839643919886.issue2987@psf.upfronthosting.co.za>
2008-05-27 20:40:36ndimlinkissue2987 messages
2008-05-27 20:40:35ndimcreate