diff options
author | Guido van Rossum <guido@python.org> | 1999-08-18 17:40:33 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1999-08-18 17:40:33 (GMT) |
commit | 5e006a3cc32b26dcb9dce4dd6875c72fc815c108 (patch) | |
tree | b8821a466c1650327b2ee75528ffdf9abf882358 | |
parent | 6c395ba31609eeffce2428280cc5d95e4fb8058a (diff) | |
download | cpython-5e006a3cc32b26dcb9dce4dd6875c72fc815c108.zip cpython-5e006a3cc32b26dcb9dce4dd6875c72fc815c108.tar.gz cpython-5e006a3cc32b26dcb9dce4dd6875c72fc815c108.tar.bz2 |
Patches by Michael Reilly to correctly deal with ftp URLs of the form
ftp://user@host//root/path: the double slash in the pathname means to
go to the root directory even if the initial directory isn't the root.
-rw-r--r-- | Lib/urllib.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/urllib.py b/Lib/urllib.py index ad1e791..4bd329f 100644 --- a/Lib/urllib.py +++ b/Lib/urllib.py @@ -362,6 +362,7 @@ class URLopener: dirs = string.splitfields(path, '/') dirs, file = dirs[:-1], dirs[-1] if dirs and not dirs[0]: dirs = dirs[1:] + if dirs and not dirs[0]: dirs[0] = '/' key = (user, host, port, string.joinfields(dirs, '/')) # XXX thread unsafe! if len(self.ftpcache) > MAXFTPCACHE: |