curl-library
[PATCH] getinfo.c: reset timecond when clearing session-info variables
Date: Sat, 20 Apr 2013 13:09:26 +0200
Hi,
as reported at [0], the timecond session variable doesn't get reset before
performing a request, so CURLINFO_CONDITION_UNMET may report wrong values (ie
"1" when it should be "0") if eg the CURLOPT_TIMEVALUE option changes between
requests.
The attached test case does two requests: the first with TIMEVALUE set into the
future so CURLINFO_CONDITION_UNMET reports "1" after, the second with TIMEVALUE
in the past, but CURLINFO_CONDITION_UNMET still reports "1". If the first
request is commented out the CURLINFO_CONDITION_UNMET of the remaining request
reports correctly "0".
Also attached is the patch that should fix this.
Cheers
[0] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=705783
-- perl -E '$_=q;$/= @{[@_]};and s;\S+;<inidehG ordnasselA>;eg;say~~reverse'
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
- text/x-csrc attachment: 705783.c
- text/x-diff attachment: 0001-getinfo.c-reset-timecond-when-clearing-session-info-.patch
- application/pgp-signature attachment: Digital signature