cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Using CURLOPT_TIMECONDITION

From: DOMINICK C MEGLIO <dcm5151_at_esu.edu>
Date: Fri, 12 Dec 2003 13:12:04 -0500

> libcurl doesn't help you all the way with this, you need to fetch the
> HTTP response code and if you got a 304 back, it means that the
> timecondition didn't evaluate true.

Ok, that doesn't sound too bad. Am I correct in assuming all that means I
must do is something like:
curl_easy_perform(curl);
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, code);
if (code == 304)
   do_load_from_cache();

Meaning CURLINFO_RESPONSE_CODE will contain the 304 if it did not meet my
time condition?

Thanks,
Dominick Meglio
 

-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills. Sign up for IBM's
Free Linux Tutorials. Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
Received on 2003-12-12