perl-www.patch 1.1 KB

123456789101112131415161718
  1. --- libwww-perl-5.70/lib/LWP/Protocol/ftp.pm.orig Fri Oct 26 22:13:20 2001
  2. +++ libwww-perl-5.70/lib/LWP/Protocol/ftp.pm Mon May 26 11:09:01 2003
  3. @@ -323,7 +323,13 @@
  4. " " . $ftp->message);
  5. }
  6. }
  7. - } elsif (!length($remote_file) || $ftp->code == 550) {
  8. + } elsif (!length($remote_file) || ( $ftp->code >= 400 && $ftp->code < 600 )) {
  9. + # be open minded and treat 4xx and 5xx treated equally - the next cwd will fail anyway if we were too broadminded
  10. + # see ftp://ftp.rfc-editor.org/in-notes/std/std9.txt
  11. + # chapter "4.2. FTP REPLIES" and chapter "6. STATE DIAGRAMS", RETR
  12. + # 4yz Transient Negative Completion reply, 450 Requested file action not taken. File unavailable (e.g., file busy).
  13. + # 5yz Permanent Negative Completion reply, 550 Requested action not taken. File unavailable (e.g., file not found, no access).
  14. + # the risk applying this patch is the incompatiblity that we now return the status of the CWD and not the RETR
  15. # 550 not a plain file, try to list instead
  16. if (length($remote_file) && !$ftp->cwd($remote_file)) {
  17. LWP::Debug::debug("chdir before listing failed");