New submission from Bastian Kleineidam <cal...@users.sourceforge.net>:

The urljoin() implementation cuts off the last base URL
character if the URL to join starts with a semicolon.
Expected output is no cut off characters.

$ python2.6
Python 2.6.6 (r266:84292, Aug 29 2010, 12:36:23) 
[GCC 4.4.5 20100824 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import urlparse
>>> print urlparse.urljoin('http://localhost:8080/feedback', ';jsessionid=XXX')
http://localhost:8080/feedbac;jsessionid=XXX
>>> 

... same in Python 3.1.2:

$ python3.1
Python 3.1.2 (release31-maint, Aug 29 2010, 18:45:17) 
[GCC 4.4.5 20100824 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib.parse
>>> urllib.parse.urljoin('http://localhost:8080/feedback', ';jsessionid=XXX')
'http://localhost:8080/feedbac;jsessionid=XXX'
>>>

... in Python 2.5 the last path segment is cut off.
$ python2.5
Python 2.5.5 (r255:77872, Aug 23 2010, 02:55:15) 
[GCC 4.4.5 20100816 (prerelease)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
m>>> import urlparse
>>> print urlparse.urljoin('http://localhost:8080/feedback', ';jsessionid=XXX')
http://localhost:8080/;jsessionid=XXX
>>>

----------
components: Library (Lib)
messages: 115252
nosy: calvin
priority: normal
severity: normal
status: open
title: urlparse.urljoin() cuts off last base character with semicolon at url 
start
type: behavior
versions: Python 2.5, Python 2.6, Python 3.1

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9721>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to