]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
Armel Asselin made the CURLOPT_PREQUOTE option work fine even when
authorDaniel Stenberg <daniel@haxx.se>
Tue, 8 Aug 2006 22:56:46 +0000 (22:56 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Tue, 8 Aug 2006 22:56:46 +0000 (22:56 +0000)
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.

CHANGES
RELEASE-NOTES
docs/libcurl/curl_easy_setopt.3
lib/ftp.c

diff --git a/CHANGES b/CHANGES
index 7c26de63c27e546ef91e993165e13a19b2c2cdb5..b2c3938582c4a2b4b437b1372474818995a157fd 100644 (file)
--- 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.
 
index 69cd3fb38cc9a0e20ff019e815c46f7317c63148..f327b5335eeae466ce95bb04581087650772d8aa 100644 (file)
@@ -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)
index 6be387d11858a34400a0e093198846a9473e3618..ea0cd165a8471c80aaf73c0f14030b60c87903df 100644 (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
 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
index c17d9fbaa229e667b8db22027520b145501a1820..a52ad56a84c133f447b4e29a92009e66cbcff1d1 100644 (file)
--- 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);