mirror of
https://github.com/curl/curl.git
synced 2026-06-03 13:14:15 +03:00
file: add support for CURLOPT_TIMECONDITION
This commit is contained in:
parent
99dcb11ed8
commit
b89122a2bf
3 changed files with 12 additions and 5 deletions
|
|
@ -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. */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue