aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-08-08 22:56:46 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-08-08 22:56:46 +0000
commit1eedad27a23e2158d5939deda66182f97cfe2212 (patch)
tree052859385adef0b9ca8813884fd8cbbadfdbf42e
parentac02d379ba4580a2ff4e5b12eaea12edca0a2250 (diff)
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.
-rw-r--r--CHANGES8
-rw-r--r--RELEASE-NOTES6
-rw-r--r--docs/libcurl/curl_easy_setopt.33
-rw-r--r--lib/ftp.c15
4 files changed, 24 insertions, 8 deletions
diff --git a/CHANGES b/CHANGES
index 7c26de63c..b2c393858 100644
--- a/CHANGES
+++ b/CHANGES
@@ -6,8 +6,14 @@
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)
-- 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
could not disable it for the second request.
diff --git a/RELEASE-NOTES b/RELEASE-NOTES
index 69cd3fb38..f327b5335 100644
--- a/RELEASE-NOTES
+++ b/RELEASE-NOTES
@@ -9,6 +9,10 @@ Curl and libcurl 7.15.6
Number of known libcurl bindings: 32
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:
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
advice from friends like these:
- Domenico Andreoli
+ Domenico Andreoli, Armel Asselin, Gisle Vanem, Yang Tse
Thanks! (and sorry if I forgot to mention someone)
diff --git a/docs/libcurl/curl_easy_setopt.3 b/docs/libcurl/curl_easy_setopt.3
index 6be387d11..ea0cd165a 100644
--- a/docs/libcurl/curl_easy_setopt.3
+++ b/docs/libcurl/curl_easy_setopt.3
@@ -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
struct curl_slist structs properly filled in as described for
\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
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
diff --git a/lib/ftp.c b/lib/ftp.c
index c17d9fbaa..a52ad56a8 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -1206,11 +1206,12 @@ static CURLcode ftp_state_post_rest(struct connectdata *conn)
struct SessionHandle *data = conn->data;
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 */
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) {
/* 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);
break;
case FTP_RETR_PREQUOTE:
- NBFTPSENDF(conn, "SIZE %s", ftp->file);
- state(conn, FTP_RETR_SIZE);
+ if (ftp->no_transfer)
+ state(conn, FTP_STOP);
+ else {
+ NBFTPSENDF(conn, "SIZE %s", ftp->file);
+ state(conn, FTP_RETR_SIZE);
+ }
break;
case FTP_STOR_PREQUOTE:
result = ftp_state_ul_setup(conn, FALSE);