Bugs item #1396543, was opened at 2006-01-04 04:57 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1396543&group_id=5470
Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Python Library Group: Python 2.4 Status: Open Resolution: None Priority: 5 Submitted By: John Hansen (johnhansen) Assigned to: Nobody/Anonymous (nobody) Summary: urlparse is confused by / Initial Comment: If the parameter field of a URL contains a '/', urlparse does not enter date in the parameter field, but leaves it attached to the path. The simplified example is: >>> urlparse.urlparse("http://f/adi;s=a;c=b/") ('http', 'f', '/adi;s=a;c=b/', '', '', '') >>> urlparse.urlparse("http://f/adi;s=a;c=b") ('http', 'f', '/adi', 's=a;c=b', '', '') The realworld case was: >>> urlparse.urlparse("http://ad.doubleclick.net/adi/ N3691.VibrantMedia/B1733031.2;sz=160x600;click=http%3A/ adforce.adtech.de/adlink%7C82%7C59111%7C1%7C168%7CAdId% 3D1023327%3BBnId%3D4%3Bitime%3D335264036%3Bku%3D12900% 3Bkey%3Dcomputing%2Bbetanews%5Fgeneral%3Blink%3D") (''http'', 'ad.doubleclick.net/adi/N3691.VibrantMedia/ B1733031.2;sz=160x600;click=http%3A/adforce.adtech.de/adlink% 7C82%7C59111%7C1%7C168%7CAdId%3D1023327%3BBnId%3D4%3Bitime %3D335264036%3Bku%3D12900%3Bkey%3Dcomputing%2Bbetanews% 5Fgeneral%3Blink%3D', '', '', '') What's odd is that the code specifically says to do this: def _splitparams(url): if '/' in url: i = url.find(';', url.rfind('/')) if i < 0: return url, '' Is there a reason for the rfind? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1396543&group_id=5470 _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com