aboutsummaryrefslogtreecommitdiff
path: root/lib/ftp.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ftp.c')
-rw-r--r--lib/ftp.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/ftp.c b/lib/ftp.c
index de5e95db9..a0eb56d88 100644
--- a/lib/ftp.c
+++ b/lib/ftp.c
@@ -1741,7 +1741,11 @@ static CURLcode ftp_state_mdtm_resp(struct connectdata *conn,
/* If we asked for a time of the file and we actually got one as well,
we "emulate" a HTTP-style header in our output. */
- if(data->set.get_filetime && (data->info.filetime>=0) ) {
+ if(conn->bits.no_body &&
+ data->set.include_header &&
+ ftp->file &&
+ data->set.get_filetime &&
+ (data->info.filetime>=0) ) {
struct tm *tm;
time_t clock = (time_t)data->info.filetime;
#ifdef HAVE_GMTIME_R
@@ -1763,7 +1767,7 @@ static CURLcode ftp_state_mdtm_resp(struct connectdata *conn,
result = Curl_client_write(data, CLIENTWRITE_BOTH, buf, 0);
if(result)
return result;
- }
+ } /* end of a ridiculous amount of conditionals */
}
break;
default: