mirror of
https://github.com/curl/curl.git
synced 2026-08-26 03:03:36 +03:00
CURLINFO_CONDITION_UNMET: return true for 304 http status code
In libcurl, CURLINFO_CONDITION_UNMET is used to avoid writing to the output file if the server did not transfered a file based on time condition. In the same manner, getting a 304 HTTP response back from the server, for example after passing a custom If-Match-* header, also fulfill this condition. Fixes #5181 Closes #5183
This commit is contained in:
parent
a448a4ce26
commit
54ecc11cc4
3 changed files with 10 additions and 5 deletions
|
|
@ -239,8 +239,11 @@ static CURLcode getinfo_long(struct Curl_easy *data, CURLINFO info,
|
|||
*param_longp = data->info.conn_local_port;
|
||||
break;
|
||||
case CURLINFO_CONDITION_UNMET:
|
||||
/* return if the condition prevented the document to get transferred */
|
||||
*param_longp = data->info.timecond ? 1L : 0L;
|
||||
if(data->info.httpcode == 304)
|
||||
*param_longp = 1L;
|
||||
else
|
||||
/* return if the condition prevented the document to get transferred */
|
||||
*param_longp = data->info.timecond ? 1L : 0L;
|
||||
break;
|
||||
case CURLINFO_RTSP_CLIENT_CSEQ:
|
||||
*param_longp = data->state.rtsp_next_client_CSeq;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue