curl-library
Re: [PATCH] getinfo.c: reset timecond when clearing session-info variables
Date: Mon, 22 Apr 2013 20:26:47 +0200
On lun, apr 22, 2013 at 12:08:26 +0200, Daniel Stenberg wrote:
> On Sat, 20 Apr 2013, Alessandro Ghedini wrote:
>
> >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.
>
> Thanks! Any chance you can convert the test case into a "proper"
> libcurl test case for inclusion in the curl test suite to avoid
> future regressions on this?
See attached patch. The problem is that the test case doesn't work. If I run it
with "./runtests.pl 1511" I get the following output:
> test 1511...[simple libcurl HTTP GET tool to check time condition]
>
> 1511: data FAILED:
> --- log/check-expected 2013-04-22 20:18:50.778607411 +0200
> +++ log/check-generated 2013-04-22 20:18:50.778607411 +0200
> @@ -6,4 +6,12 @@
> Content-Length: 12
> Connection: close
>
> +HTTP/1.1 200
> +Date: Thu, 09 Nov 2010 14:49:00 GMT
> +Server: test-server/fake
> +Last-Modified: Mon, 22 Apr 2013 17:45:05 GMT
> +Content-Type: text/html
> +Content-Length: 12
> +Connection: close
> +
> Hello World
>
> - abort tests
But if I remove the "Last-Modified: ..." line from tests/data/test1511 I get:
> test 1511...[simple libcurl HTTP GET tool to check time condition]
>
> lib1511 returned 255, when expecting 0
> exit FAILED
>
> - abort tests
(which is correct I guess, since there's no Last-Modified header)
Soooo, what am I doing wrong? How do I get it to work with the Last-Modified
header?
(Also, I attached another patch to gitignore the lib151* files too)
Cheers
-- 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-diff attachment: 0001-tests-add-test1511-to-check-timecond-clean-up.patch
- text/x-diff attachment: 0001-libtest-ignore-lib151-files-too.patch
- application/pgp-signature attachment: Digital signature