aboutsummaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2000-01-10 23:36:14 +0000
committerDaniel Stenberg <daniel@haxx.se>2000-01-10 23:36:14 +0000
commit26e8ccc63151a1c12db709cef4051803afd21189 (patch)
tree55466d09c809a09238480e7a32f309c7b5d0fa43 /lib/ftp.c
parent067a75e8957a91fb3407d1112931991998ae9219 (diff)
syncing with local edit
Diffstat (limited to 'lib/ftp.c')
-rw-r--r--lib/ftp.c24
1 files changed, 23 insertions, 1 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index d62891298..fb753f213 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -79,7 +79,7 @@
#include "progress.h"
#include "upload.h"
#include "download.h"
-
+#include "escape.h"
/* returns last node in linked list */
static struct curl_slist *slist_get_last(struct curl_slist *list)
@@ -1014,6 +1014,28 @@ UrgError _ftp(struct UrlData *data,
return URG_FTP_WRITE_ERROR;
}
+ /* Send any post-transfer QUOTE strings? */
+ if(data->postquote) {
+ qitem = data->postquote;
+ /* Send all QUOTE strings in same order as on command-line */
+ while (qitem) {
+ /* Send string */
+ if (qitem->data) {
+ sendf(data->firstsocket, data, "%s\r\n", qitem->data);
+
+ nread = GetLastResponse(data->firstsocket, buf, data);
+
+ if (buf[0] != '2') {
+ failf(data, "QUOT string not accepted: %s",
+ qitem->data);
+ return URG_FTP_QUOTE_ERROR;
+ }
+ }
+ qitem = qitem->next;
+ }
+ }
+
+
return URG_OK;
}