urlparse.urlparse bug - misparses long URL

John Nagle nagle at animats.com
Fri Dec 14 02:46:10 EST 2007


John Nagle wrote:
> Here's a hostile URL that "urlparse.urlparse" seems to have mis-parsed.
...
Simpler example:

import urlparse
s = 'http://www.example.com.mx?https://www.example.com'
print urlparse.urlparse(s)

produces
('http', 'www.example.com.mx?https:', '//www.example.com', '', '', '')

which is wrong.

				John Nagle
				SiteTruth



More information about the Python-list mailing list