file: add support for CURLOPT_TIMECONDITION

This commit is contained in:
Dave Reisner
2011-01-29 22:41:07 -05:00
committed by Kamil Dudka
parent 99dcb11ed8
commit b89122a2bf
3 changed files with 12 additions and 5 deletions

View File

@@ -463,6 +463,13 @@ static CURLcode file_do(struct connectdata *conn, bool *done)
fstated = TRUE;
}
if(fstated && !data->state.range && data->set.timecondition) {
if(!Curl_meets_timecondition(data, data->info.filetime)) {
*done = TRUE;
return CURLE_OK;
}
}
/* If we have selected NOBODY and HEADER, it means that we only want file
information. Which for FILE can't be much more than the file size and
date. */