mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
- Fred Machado posted about a weird FTP problem on the curl-users list and when
researching it, it turned out he got a 550 response back from a SIZE command and then I fell over the text in RFC3659 that says: The presence of the 550 error response to a SIZE command MUST NOT be taken by the client as an indication that the file cannot be transferred in the current MODE and TYPE. In other words: the change I did on September 30th 2008 and that has been included in the last two releases were a regression and a bad idea. We MUST NOT take a 550 response from SIZE as a hint that the file doesn't exist.
This commit is contained in:
parent
f36eab2608
commit
18371aaff9
12
CHANGES
12
CHANGES
@ -7,6 +7,18 @@
|
|||||||
Changelog
|
Changelog
|
||||||
|
|
||||||
Daniel Stenberg (8 Dec 2008)
|
Daniel Stenberg (8 Dec 2008)
|
||||||
|
- Fred Machado posted about a weird FTP problem on the curl-users list and when
|
||||||
|
researching it, it turned out he got a 550 response back from a SIZE command
|
||||||
|
and then I fell over the text in RFC3659 that says:
|
||||||
|
|
||||||
|
The presence of the 550 error response to a SIZE command MUST NOT be taken
|
||||||
|
by the client as an indication that the file cannot be transferred in the
|
||||||
|
current MODE and TYPE.
|
||||||
|
|
||||||
|
In other words: the change I did on September 30th 2008 and that has been
|
||||||
|
included in the last two releases were a regression and a bad idea. We MUST
|
||||||
|
NOT take a 550 response from SIZE as a hint that the file doesn't exist.
|
||||||
|
|
||||||
- Christian Krause filed bug #2221237
|
- Christian Krause filed bug #2221237
|
||||||
(http://curl.haxx.se/bug/view.cgi?id=2221237) that identified an infinite
|
(http://curl.haxx.se/bug/view.cgi?id=2221237) that identified an infinite
|
||||||
loop during GSS authentication given some specific conditions. With his
|
loop during GSS authentication given some specific conditions. With his
|
||||||
|
@ -25,6 +25,7 @@ This release includes the following bugfixes:
|
|||||||
o bad fclose() after a fatal error in cookie code
|
o bad fclose() after a fatal error in cookie code
|
||||||
o curl_multi_remove_handle() when the handle was in use in a HTTP pipeline
|
o curl_multi_remove_handle() when the handle was in use in a HTTP pipeline
|
||||||
o GSS authentication infinite loop problem
|
o GSS authentication infinite loop problem
|
||||||
|
o 550 response from SIZE no longer treated as missing file
|
||||||
|
|
||||||
This release includes the following known bugs:
|
This release includes the following known bugs:
|
||||||
|
|
||||||
@ -34,6 +35,7 @@ This release would not have looked like this without help, code, reports and
|
|||||||
advice from friends like these:
|
advice from friends like these:
|
||||||
|
|
||||||
Yang Tse, Daniel Fandrich, Jim Meyering, Christian Krause, Andreas Wurf,
|
Yang Tse, Daniel Fandrich, Jim Meyering, Christian Krause, Andreas Wurf,
|
||||||
Markus Koetter, Josef Wolf, Vlad Grachov, Pawel Kierski, Igor Novoseltsev
|
Markus Koetter, Josef Wolf, Vlad Grachov, Pawel Kierski, Igor Novoseltsev,
|
||||||
|
Fred Machado
|
||||||
|
|
||||||
Thanks! (and sorry if I forgot to mention someone)
|
Thanks! (and sorry if I forgot to mention someone)
|
||||||
|
@ -2190,10 +2190,6 @@ static CURLcode ftp_state_size_resp(struct connectdata *conn,
|
|||||||
curl_off_t filesize;
|
curl_off_t filesize;
|
||||||
char *buf = data->state.buffer;
|
char *buf = data->state.buffer;
|
||||||
|
|
||||||
if((instate != FTP_STOR_SIZE) && (ftpcode == 550))
|
|
||||||
/* the file doesn't exist and we're not about to upload */
|
|
||||||
return CURLE_REMOTE_FILE_NOT_FOUND;
|
|
||||||
|
|
||||||
/* get the size from the ascii string: */
|
/* get the size from the ascii string: */
|
||||||
filesize = (ftpcode == 213)?curlx_strtoofft(buf+4, NULL, 0):-1;
|
filesize = (ftpcode == 213)?curlx_strtoofft(buf+4, NULL, 0):-1;
|
||||||
|
|
||||||
@ -3169,7 +3165,6 @@ static CURLcode ftp_done(struct connectdata *conn, CURLcode status,
|
|||||||
case CURLE_UPLOAD_FAILED:
|
case CURLE_UPLOAD_FAILED:
|
||||||
case CURLE_REMOTE_ACCESS_DENIED:
|
case CURLE_REMOTE_ACCESS_DENIED:
|
||||||
case CURLE_FILESIZE_EXCEEDED:
|
case CURLE_FILESIZE_EXCEEDED:
|
||||||
case CURLE_REMOTE_FILE_NOT_FOUND:
|
|
||||||
/* the connection stays alive fine even though this happened */
|
/* the connection stays alive fine even though this happened */
|
||||||
/* fall-through */
|
/* fall-through */
|
||||||
case CURLE_OK: /* doesn't affect the control connection's status */
|
case CURLE_OK: /* doesn't affect the control connection's status */
|
||||||
|
@ -9,9 +9,6 @@ FAILURE
|
|||||||
</info>
|
</info>
|
||||||
# Server-side
|
# Server-side
|
||||||
<reply>
|
<reply>
|
||||||
<size>
|
|
||||||
1
|
|
||||||
</size>
|
|
||||||
<servercmd>
|
<servercmd>
|
||||||
REPLY RETR 314 bluah you f00l!
|
REPLY RETR 314 bluah you f00l!
|
||||||
REPLY EPSV 314 bluah you f00l!
|
REPLY EPSV 314 bluah you f00l!
|
||||||
|
@ -45,8 +45,10 @@ CWD path
|
|||||||
EPSV
|
EPSV
|
||||||
TYPE I
|
TYPE I
|
||||||
SIZE 533
|
SIZE 533
|
||||||
|
RETR 533
|
||||||
EPSV
|
EPSV
|
||||||
SIZE 533
|
SIZE 533
|
||||||
|
RETR 533
|
||||||
QUIT
|
QUIT
|
||||||
</protocol>
|
</protocol>
|
||||||
</verify>
|
</verify>
|
||||||
|
@ -45,6 +45,7 @@ CWD path
|
|||||||
EPSV
|
EPSV
|
||||||
TYPE I
|
TYPE I
|
||||||
SIZE 534
|
SIZE 534
|
||||||
|
RETR 534
|
||||||
QUIT
|
QUIT
|
||||||
</protocol>
|
</protocol>
|
||||||
</verify>
|
</verify>
|
||||||
|
@ -19,6 +19,8 @@ works
|
|||||||
</data>
|
</data>
|
||||||
|
|
||||||
<servercmd>
|
<servercmd>
|
||||||
|
REPLY RETR 550 the file doesn't exist
|
||||||
|
COUNT RETR 1
|
||||||
REPLY SIZE 550 Can't check for file existence
|
REPLY SIZE 550 Can't check for file existence
|
||||||
COUNT SIZE 1
|
COUNT SIZE 1
|
||||||
</servercmd>
|
</servercmd>
|
||||||
@ -50,6 +52,7 @@ CWD path
|
|||||||
EPSV
|
EPSV
|
||||||
TYPE I
|
TYPE I
|
||||||
SIZE 546
|
SIZE 546
|
||||||
|
RETR 546
|
||||||
EPSV
|
EPSV
|
||||||
SIZE 546
|
SIZE 546
|
||||||
RETR 546
|
RETR 546
|
||||||
|
@ -407,14 +407,12 @@ sub SIZE_command {
|
|||||||
|
|
||||||
my $size = $data[0];
|
my $size = $data[0];
|
||||||
|
|
||||||
if($size ne "") {
|
if($size) {
|
||||||
# we check for "" to be able to explictly set the size to 0 and yet have
|
|
||||||
# that send a 213
|
|
||||||
if($size > -1) {
|
if($size > -1) {
|
||||||
sendcontrol "213 $size\r\n";
|
sendcontrol "213 $size\r\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sendcontrol "350 $testno: SIZE is not supported.\r\n";
|
sendcontrol "550 $testno: No such file or directory.\r\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -427,7 +425,7 @@ sub SIZE_command {
|
|||||||
sendcontrol "213 $size\r\n";
|
sendcontrol "213 $size\r\n";
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
sendcontrol "350 $testno: SIZE is not supported.\r\n";
|
sendcontrol "550 $testno: No such file or directory.\r\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user