cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: last modified field.

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Fri, 5 Oct 2007 13:39:30 +0200 (CEST)

On Fri, 5 Oct 2007, Nishantha Pradeep wrote:

> I was able to send the http head request and and get the header of required
> file by the help of this mailing list.In my project i just need the
> "last-modified" field in the header fields.So I am now going to do is what
> that redirecting the standard output from the moniter and read it,then apply
> a string matching and fetch the last-modified field.It seems to be somewhat
> hard and i would like to know that is there another way of doing this.

I don't see how doing strncasecmp() or equivalent on the headers is hard in
any way. libcurl makes sure that you get full single headers passed in, all
you need to do is check for the right header.

This said, if you "just" want the last-modified time CURLOPT_FILETIME
(http://curl.haxx.se/libcurl/c/curl_easy_setopt.html#CURLOPTFILETIME) should
be what you want.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-10-05