Issue1470976
Created on 2006年04月15日 20:03 by jjlee, last changed 2022年04月11日 14:56 by admin. This issue is now closed.
| Files |
| File name |
Uploaded |
Description |
Edit |
|
ftp_nlst.patch
|
jjlee,
2006年04月15日 20:03
|
| Messages (2) |
|
msg50019 - (view) |
Author: John J Lee (jjlee) |
Date: 2006年04月15日 20:03 |
This fixes 1357260 and 1281692.
As suggested in the initial comment for 1357260, the
patch simply removes the code that does an NLST before
the attempt to actually fetch the file, since some
server operators turn off file listing (presumably in
an attempt to provide increased security of some kind).
"Easier to ask forgiveness than get permission"
applies to the FTP protocol as much as to Python :-)
FWIW, I verified that this allows retrieval in some
cases where it wasn't previously, using proftpd 1.2.10
(gentoo ebuild r7) with this configuration directive
placed inside the <Anonymous ~ftp></Anonymous> directive:
<Limit LIST NLST>
DenyAll
</Limit>
Without the patch, I get a 450 when doing a urlopen on
files accessible from that server (using either urllib
or urllib2). With the patch, I can retrieve the files.
|
|
msg50020 - (view) |
Author: Georg Brandl (georg.brandl) * (Python committer) |
Date: 2006年04月30日 09:26 |
Logged In: YES
user_id=849994
Committed in rev. 45819.
|
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2022年04月11日 14:56:16 | admin | set | github: 43220 |
| 2006年04月15日 20:03:49 | jjlee | create |