curl-library
RE: CURLOPT_WRITEFUNCTION callback not called when If-Modified-Since not obeyed
Date: Mon, 16 May 2011 08:53:45 -0700
Daniel Stenberg wrote:
> On Thu, 12 May 2011, Steve Liao wrote:
>
> > If-Modified-Since: Sun, 01 May 2011 17:11:14 GMT\r\n
>
> ...
>
> > Last-Modified: Sun, 01 May 2011 17:11:14 GMT\r\n
>
> See, it *hasn't been modified* since the given time so libcurl is obviously
> doing the right thing for you! The HTTP server doesn't seem to acknowledge the
> request properly though so libcurl had to do the check itself.
>
> I also just added test case 1126 and 1127 that verify that curl does indeed
> work like this.
Libcurl 7.17.1 called the callback registered against CURLOPT_WRITEFUNCTION. However, Libcurl 7.21.6 no longer does. So the application using 7.21.6 needs to check if the Last-Modified in the 200 OK is the same as the If-Modified-Since in the GET request. If that's the case, the applilcation shall handle this as if a 304 were returned and must not expect the writefunction callback to be invoked. Would you please confirm my understanding?
Many Thanks,
Steve
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-05-16