Problem using os.path.normpath on Windows

Robert Collins robertc at robertcollins.net
Mon Sep 19 02:12:43 BST 2005


On Thu, 2005-08-18 at 23:54 -0400, Matt Lavin wrote:
> I was testing out bzr on Windows and I ran into a small problem with 
> fetching from an http url.  If I execute `bzr branch 
> http://bazaar-ng.org/bzr/bzr.dev` then I get a failure in _make_request 
> telling me that I received a HTTP 404 failure. 
> 
> I did a little debugging and found that the line 'path = 
> os.path.normpath(path)' in bzrutil/urlgrabber/grabber.py ( is _parse_url 
> ) is the problem.  That method does not work like the method expects 
> when running on windows since the forward slashes get translated to 
> backwards slashes. 

I think we've stopped using urlgrabber.. but for reference anyway: the
os.* calls are generally unsafe on urls of any sort. For instance:
http://host/../otherhost != http://otherhost.

Rob

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050919/7db1a76f/attachment.pgp 


More information about the bazaar mailing list