[New-bugs-announce] [issue35236] urllib.request.urlopen throws on some valid FTP files
Ian Liu Rodrigues
report at bugs.python.org
Tue Nov 13 14:20:41 EST 2018
New submission from Ian Liu Rodrigues <ian.liu88 at gmail.com>:
Some FTP clients will not allow changing to a directory if the path does not ends with a slash. For example, try out this in a public FTP:
from ftplib import FTP
ftp = FTP('ftp.unicamp.br')
ftp.login()
ftp.cwd('pub/libreoffice') # throws error
ftp.cwd('pub/libreoffice/') # OK
The problem is urllib.request doesn't include the trailing slash, thus throwing an error. This behavior also happens with the command line ftp client.
I think this happens because the libreoffice directory is a symlink, and this can be a FTP server specific behavior.
----------
components: Library (Lib)
messages: 329862
nosy: Ian Liu Rodrigues
priority: normal
severity: normal
status: open
title: urllib.request.urlopen throws on some valid FTP files
type: behavior
versions: Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35236>
_______________________________________
More information about the New-bugs-announce
mailing list