This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author orsenthil
Recipients benjamin.peterson, eric.araujo, jjlee, ndim, orsenthil, pitrou, sergiomb2, tlocke
Date 2010-04-12.06:42:05
SpamBayes Score 2.7576936e-05
Marked as misclassified No
Message-id <1271054528.86.0.912962444229.issue2987@psf.upfronthosting.co.za>
In-reply-to
Content
After spending a sufficient amount of time looking at patches and the RFC 2732, I tend to agree with the patch provided by tlocke. It does cover the behavior for parsing IPv6 URL with '[' hostname ']'. RFC 2732 is very short and just says that hostname in the IPv6 should not have '[' and ']' characters. The patch does just that, which is fine.

If hard pressed on detecting invalid IPv6 , I would add and extra 

+        if "[" in netloc and "]" in netloc:
+                return netloc.split("]")[0][1:].lower()
+        elif "[" in netloc or "]" in netloc:
+                raise ValueError("Invalid IPv6 URL")

Which should take care of Invalid IPv6 urls as discussed in this bug.

- Any comments on this?

Also regarding the urlparse header docs, (it was long pending on me and sorry), here is a patch for current one for review. When we address this bug, I shall include RFC 2732 as well in the list.
History
Date User Action Args
2010-04-12 06:42:08orsenthilsetrecipients: + orsenthil, jjlee, pitrou, benjamin.peterson, ndim, eric.araujo, sergiomb2, tlocke
2010-04-12 06:42:08orsenthilsetmessageid: <1271054528.86.0.912962444229.issue2987@psf.upfronthosting.co.za>
2010-04-12 06:42:07orsenthillinkissue2987 messages
2010-04-12 06:42:06orsenthilcreate