[issue18140] urlparse.urlsplit confused to fragment when password include #

2015-02-08 Thread Martin Panter
Martin Panter added the comment: Possibly related: Issue 23328. I would have thought any special characters in the password etc field should be encoded. Where do such unencoded URLs come from? It seems that this would change the behaviour of parsing a URL such as http://host/path/with/unencod

[issue18140] urlparse.urlsplit confused to fragment when password include #

2013-06-19 Thread Madison May
Madison May added the comment: Here's a potential patch for the issue, should we decide it's worth fixing. All current tests pass with the update version of _splitnetloc(), and I've added a test to test_urlparse to check that urls with '#' or '?' in the password field are treated properly. --

[issue18140] urlparse.urlsplit confused to fragment when password include #

2013-06-05 Thread Madison May
Madison May added the comment: My apologies -- that was an oversight on my part. Now that I look at the issue again, it's plain that it most likely won't be an issue. Problems only arise when you allow '#' to occur before '?' and then treat portion of the url between the '#' and '?' as a fra

[issue18140] urlparse.urlsplit confused to fragment when password include #

2013-06-05 Thread Dmi Baranov
Dmi Baranov added the comment: anh, nice catch. Madison, I'm not see any terrible consequences, only urlsplit is affected now: >>> urlsplit('http://user:passw...@domain.com:80/path?query#fragment') SplitResult(scheme='http', netloc='user:passw...@domain.com:80', path='/path', query='query', fra

[issue18140] urlparse.urlsplit confused to fragment when password include #

2013-06-05 Thread Madison May
Madison May added the comment: urllib.parse.urlsplit() in Python3.3 behaves the same way. Since urlsplit takes an optional param "allow_fragments", I don't think it should be a high priority issue. The relevant code from Python3.3 is below, however: if allow_fragments and '#' in url:

[issue18140] urlparse.urlsplit confused to fragment when password include #

2013-06-05 Thread Senthil Kumaran
Changes by Senthil Kumaran : -- assignee: -> orsenthil nosy: +orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue18140] urlparse.urlsplit confused to fragment when password include #

2013-06-05 Thread anh le
New submission from anh le: >>> u = 'http://auser:secr#et@192.168.0.1:8080/a/b/c.html' >>> urlparse.urlsplit(u) SplitResult(scheme='http', netloc='auser:secr', path='', query='', fragment='et@192.168.0.1:8080/a/b/c.html') -- components: Library (Lib) messages: 190646 nosy: anh.le priori