Re: urllib interpretation of URL with ".."
- From: sergio <sergio@xxxxxxxxxxxxxxxxxx>
- Date: Tue, 26 Jun 2007 21:26:06 +0100
John Nagle wrote:
In Python, of course, "urlparse.urlparse", which is
the main function used to disassemble a URL, has no idea whether it's
being used by a client or a server, so it, reasonably enough, takes option
1.
'http://somesite.com/page.html'import urlparse
base="http://somesite.com/level1/"
path="../page.html"
urlparse.urljoin(base,path)
'http://somesite.com/../page.html'base="http://somesite.com/"
urlparse.urljoin(base,path)
For me this is a bug and is very annoying because I can't simply trip ../
from path because base could have a level.
--
Best regards,
--
Sérgio M. B.
.
- Follow-Ups:
- Re: urllib interpretation of URL with ".."
- From: Gabriel Genellina
- Re: urllib interpretation of URL with ".."
- References:
- urllib interpretation of URL with ".."
- From: John Nagle
- Re: urllib interpretation of URL with ".."
- From: "Martin v. Löwis"
- Re: urllib interpretation of URL with ".."
- From: Duncan Booth
- Re: urllib interpretation of URL with ".."
- From: John Nagle
- urllib interpretation of URL with ".."
- Prev by Date: Re: problem mixing gettext and properties
- Next by Date: ironpython exception line number
- Previous by thread: Re: urllib interpretation of URL with ".."
- Next by thread: Re: urllib interpretation of URL with ".."
- Index(es):
Relevant Pages
|