Senthil Kumaran <orsent...@gmail.com> added the comment:

With respect to msg98314 (http://bugs.python.org/msg98314) referenced in this 
bug, which I thought is easy to handle, does not appear so. It is bit tricky.

The problem is the relative url is given of the format 
'07.11.2009-9:54:12-1.jpg' and urlparse wrongly assumes that it is VALID url 
with the scheme as 07.11.2009-9 ( Surprisingly, this falls under valid 
characters for a URL Scheme, but we know that there no url scheme like that).

But when you give ./07.11.2009-9, ./ is identified a relative path and urljoin 
happens properly. 

My inclination for this specific msg9814, is the allow the user to give the 
proper path like ./07.11.2009-9 or use urljoin from different directory, 
images/07.11.2009-9 and this should handle it.

This date-time relative url is not a typical scenario, but for  typical 
scnerios, urlparse behaves as expected.

>>> x = 'http://a.b.c'
>>> urlparse.urljoin(x,'foo')
'http://a.b.c/foo'
>>> urlparse.urljoin(x,'./foo')
'http://a.b.c/foo'
>>> 

I shall provide my comments on the IPv6 parse in next msg.

----------

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

Reply via email to