As reported by "Tro" in http://curl.haxx.se/mail/lib-2007-06/0161.html and
http://curl.haxx.se/mail/lib-2007-06/0238.html, libcurl didn't properly do no-body requests on FTP files on re-used connections properly, or at least it didn't provide the info back in the header callback properly in the subsequent requests.
This commit is contained in:
parent
0f9e209534
commit
af4edf10f5
7
CHANGES
7
CHANGES
@ -6,6 +6,13 @@
|
|||||||
|
|
||||||
Changelog
|
Changelog
|
||||||
|
|
||||||
|
Daniel S (23 June 2007)
|
||||||
|
- As reported by "Tro" in http://curl.haxx.se/mail/lib-2007-06/0161.html and
|
||||||
|
http://curl.haxx.se/mail/lib-2007-06/0238.html, libcurl didn't properly do
|
||||||
|
no-body requests on FTP files on re-used connections properly, or at least
|
||||||
|
it didn't provide the info back in the header callback properly in the
|
||||||
|
subsequent requests.
|
||||||
|
|
||||||
Daniel S (21 June 2007)
|
Daniel S (21 June 2007)
|
||||||
- Gerrit Bruchhäuser pointed out a warning that the Intel(R) Thread Checker
|
- Gerrit Bruchhäuser pointed out a warning that the Intel(R) Thread Checker
|
||||||
tool reports and it was indeed a legitimate one and it is one fixed. It was
|
tool reports and it was indeed a legitimate one and it is one fixed. It was
|
||||||
|
@ -61,6 +61,7 @@ This release includes the following bugfixes:
|
|||||||
o list FTP root directories when login dir is not root
|
o list FTP root directories when login dir is not root
|
||||||
o no longer slows down when getting very many URLs on the same command line
|
o no longer slows down when getting very many URLs on the same command line
|
||||||
o lock share before decreasing dirty counter
|
o lock share before decreasing dirty counter
|
||||||
|
o no-body FTP requests on re-used connections
|
||||||
|
|
||||||
This release includes the following known bugs:
|
This release includes the following known bugs:
|
||||||
|
|
||||||
|
15
lib/ftp.c
15
lib/ftp.c
@ -1253,9 +1253,8 @@ static CURLcode ftp_state_post_rest(struct connectdata *conn)
|
|||||||
struct FTP *ftp = conn->data->reqdata.proto.ftp;
|
struct FTP *ftp = conn->data->reqdata.proto.ftp;
|
||||||
struct SessionHandle *data = conn->data;
|
struct SessionHandle *data = conn->data;
|
||||||
|
|
||||||
if(ftp->no_transfer || conn->bits.no_body) {
|
if(ftp->no_transfer) {
|
||||||
/* doesn't transfer any data */
|
/* doesn't transfer any data */
|
||||||
ftp->no_transfer = TRUE;
|
|
||||||
|
|
||||||
/* still possibly do PRE QUOTE jobs */
|
/* still possibly do PRE QUOTE jobs */
|
||||||
state(conn, FTP_RETR_PREQUOTE);
|
state(conn, FTP_RETR_PREQUOTE);
|
||||||
@ -3351,7 +3350,7 @@ CURLcode Curl_ftp_nextconnect(struct connectdata *conn)
|
|||||||
|
|
||||||
DEBUGF(infof(data, "DO-MORE phase starts\n"));
|
DEBUGF(infof(data, "DO-MORE phase starts\n"));
|
||||||
|
|
||||||
if(!ftp->no_transfer && !conn->bits.no_body) {
|
if(!ftp->no_transfer) {
|
||||||
/* a transfer is about to take place */
|
/* a transfer is about to take place */
|
||||||
|
|
||||||
if(data->set.upload) {
|
if(data->set.upload) {
|
||||||
@ -3415,6 +3414,13 @@ CURLcode ftp_perform(struct connectdata *conn,
|
|||||||
|
|
||||||
DEBUGF(infof(conn->data, "DO phase starts\n"));
|
DEBUGF(infof(conn->data, "DO phase starts\n"));
|
||||||
|
|
||||||
|
if(conn->bits.no_body) {
|
||||||
|
/* requested no body means no transfer... */
|
||||||
|
struct FTP *ftp = conn->data->reqdata.proto.ftp;
|
||||||
|
ftp->no_transfer = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
*dophase_done = FALSE; /* not done yet */
|
*dophase_done = FALSE; /* not done yet */
|
||||||
|
|
||||||
/* start the first command in the DO phase */
|
/* start the first command in the DO phase */
|
||||||
@ -3795,8 +3801,7 @@ CURLcode ftp_parse_url_path(struct connectdata *conn)
|
|||||||
ftp->file=NULL; /* instead of point to a zero byte, we make it a NULL
|
ftp->file=NULL; /* instead of point to a zero byte, we make it a NULL
|
||||||
pointer */
|
pointer */
|
||||||
|
|
||||||
if(data->set.upload && !ftp->file &&
|
if(data->set.upload && !ftp->file && !ftp->no_transfer) {
|
||||||
(!ftp->no_transfer || conn->bits.no_body)) {
|
|
||||||
/* We need a file name when uploading. Return error! */
|
/* We need a file name when uploading. Return error! */
|
||||||
failf(data, "Uploading to a URL without a file name!");
|
failf(data, "Uploading to a URL without a file name!");
|
||||||
return CURLE_URL_MALFORMAT;
|
return CURLE_URL_MALFORMAT;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user