cURL / Mailing Lists / curl-library / Single Mail


libcurl, curl_easy_getinfo() with CURLINFO_FILETIME return 0 filetime when used with the "file:" protocol.

From: <>
Date: Mon, 3 Nov 2008 12:35:01 -0800 (PST)

When using curl_easy_getinfo() with CURLINFO_FILETIME a file time is not returned when using the "file:" protocol.

Our application uses libcurl to get data files via ftp:, http: and local files via file:. But the file: protocol doesn't return a file time in a call to curl_easy_getinfo.
     curl_easy_getinfo( m_curl, CURLINFO_FILETIME, &curl_filetime );

So a while back I made a change to libcurl so a call to curl_easy_getinfo with CURLINFO_FILETIME after fetching a file: type url would return the timestamp of the file. In file.c I added this call,
      data->info.filetime = (long)statbuf.st_mtime;
The attached file include this change for curl version 7.19.0.

I've been reapplying this change to each new version as I pick them up. If possible I'd like to get this into the base source for libcurl.


  • application/octet-stream attachment: file.c
Received on 2008-11-03