فهرست منبع

this patch file is needed, too

Thomas Lotterer 23 سال پیش
والد
کامیت
93cb885528
1فایلهای تغییر یافته به همراه17 افزوده شده و 0 حذف شده
  1. 17 0
      perl-www/perl-www.patch

+ 17 - 0
perl-www/perl-www.patch

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