Martin v. Löwis wrote:
> Andrew Dalke schrieb:
>>>>> urlparse.urljoin("http://blah.com/", "..")
>> 'http://blah.com/'
>>>>> urlparse.urljoin("http://blah.com/", "../")
>> 'http://blah.com/../'
>>>>> urlparse.urljoin("http://blah.com/", "../..")
>> 'http://blah.com/'
>>
>> Does the result make sense to you? Does it make
>> sense that the last of these is shorter than the middle
>> one? It sure doesn't to me. I thought it was obvious
>> that there was an error;
>
> That wasn't obvious at all to me. Now looking at the
> examples, I agree there is an error. The middle one
> is incorrect;
>
> urlparse.urljoin("http://blah.com/", "../")
>
> should also give 'http://blah.com/'.
make that: could also give 'http://blah.com/'.
as I said, today's urljoin doesn't guarantee that the output is
the *shortest* possible way to represent the resulting URI.
</F>
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com