1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 08:08:50 -05:00

Armel Asselin made the CURLOPT_PREQUOTE option work fine even when

CURLOPT_NOBODY is set true. PREQUOTE is then run roughly at the same place
in the command sequence as it would have run if there would've been a
transfer.
This commit is contained in:
Daniel Stenberg 2006-08-08 22:56:46 +00:00
parent ac02d379ba
commit 1eedad27a2
4 changed files with 24 additions and 8 deletions

View File

@ -6,8 +6,14 @@
Changelog Changelog
Daniel (9 August 2006)
- Armel Asselin made the CURLOPT_PREQUOTE option work fine even when
CURLOPT_NOBODY is set true. PREQUOTE is then run roughly at the same place
in the command sequence as it would have run if there would've been a
transfer.
Daniel (8 August 2006) Daniel (8 August 2006)
- Fixed a flaw in the "Expect: 100-continue" treatment. If you did two POSTs - - Fixed a flaw in the "Expect: 100-continue" treatment. If you did two POSTs
on a persistent connection and allowed the first to use that header, you on a persistent connection and allowed the first to use that header, you
could not disable it for the second request. could not disable it for the second request.

View File

@ -9,6 +9,10 @@ Curl and libcurl 7.15.6
Number of known libcurl bindings: 32 Number of known libcurl bindings: 32
Number of contributors: 515 Number of contributors: 515
This release includes the following changes:
o CURLOPT_PREQUOTE works even when CURLOPT_NOBODY is set true
This release includes the following bugfixes: This release includes the following bugfixes:
o "Expect: 100-continue" disable on second POST on re-used connection o "Expect: 100-continue" disable on second POST on re-used connection
@ -17,6 +21,6 @@ This release includes the following bugfixes:
This release would not have looked like this without help, code, reports and This release would not have looked like this without help, code, reports and
advice from friends like these: advice from friends like these:
Domenico Andreoli Domenico Andreoli, Armel Asselin, Gisle Vanem, Yang Tse
Thanks! (and sorry if I forgot to mention someone) Thanks! (and sorry if I forgot to mention someone)

View File

@ -821,7 +821,8 @@ Pass a pointer to a linked list of FTP commands to pass to the server after
the transfer type is set. The linked list should be a fully valid list of the transfer type is set. The linked list should be a fully valid list of
struct curl_slist structs properly filled in as described for struct curl_slist structs properly filled in as described for
\fICURLOPT_QUOTE\fP. Disable this operation again by setting a NULL to this \fICURLOPT_QUOTE\fP. Disable this operation again by setting a NULL to this
option. option. Before version 7.15.6, if you also set \fICURLOPT_NOBODY\fP non-zero,
this option didn't work.
.IP CURLOPT_FTPLISTONLY .IP CURLOPT_FTPLISTONLY
A non-zero parameter tells the library to just list the names of an ftp A non-zero parameter tells the library to just list the names of an ftp
directory, instead of doing a full directory listing that would include file directory, instead of doing a full directory listing that would include file

View File

@ -1206,11 +1206,12 @@ static CURLcode ftp_state_post_rest(struct connectdata *conn)
struct SessionHandle *data = conn->data; struct SessionHandle *data = conn->data;
if(ftp->no_transfer || conn->bits.no_body) { if(ftp->no_transfer || conn->bits.no_body) {
/* then we're done with a "head"-like request, goto STOP */
state(conn, FTP_STOP);
/* doesn't transfer any data */ /* doesn't transfer any data */
ftp->no_transfer = TRUE; ftp->no_transfer = TRUE;
/* still possibly do PRE QUOTE jobs */
state(conn, FTP_RETR_PREQUOTE);
result = ftp_state_quote(conn, TRUE, FTP_RETR_PREQUOTE);
} }
else if(data->set.ftp_use_port) { else if(data->set.ftp_use_port) {
/* We have chosen to use the PORT (or similar) command */ /* We have chosen to use the PORT (or similar) command */
@ -1497,8 +1498,12 @@ static CURLcode ftp_state_quote(struct connectdata *conn,
result = ftp_state_cwd(conn); result = ftp_state_cwd(conn);
break; break;
case FTP_RETR_PREQUOTE: case FTP_RETR_PREQUOTE:
if (ftp->no_transfer)
state(conn, FTP_STOP);
else {
NBFTPSENDF(conn, "SIZE %s", ftp->file); NBFTPSENDF(conn, "SIZE %s", ftp->file);
state(conn, FTP_RETR_SIZE); state(conn, FTP_RETR_SIZE);
}
break; break;
case FTP_STOR_PREQUOTE: case FTP_STOR_PREQUOTE:
result = ftp_state_ul_setup(conn, FALSE); result = ftp_state_ul_setup(conn, FALSE);