cURL / Mailing Lists / curl-library / Single Mail

curl-library

[GitHub] Provide support for CURLOPT_TIMECONDITION on file:// schema transfers [bagder/curl GH-6] (fwd)

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Sun, 30 Jan 2011 00:50:24 +0100 (CET)

FYI,

As this isn't really to me personally...

-- 
  / daniel.haxx.se
---------- Forwarded message ----------
Date: Sat, 29 Jan 2011 20:23:13
Subject: [GitHub] Provide support for CURLOPT_TIMECONDITION on file:// schema
     transfers [bagder/curl GH-6]
falconindy wants someone to pull from falconindy:file-timecond:
This simple patch reuses logic from transfer.c to abort a file:// transfer when TIMECONDITION is specified. The mtime is already retrieved on a successful fstat of the remote file descriptor, so this seems like a low overhead addition.
Rationale: I'm working on bringing libcurl support to Arch Linux's package manager, pacman. We currently support http://, ftp://, and file:// transfers with libfetch, which requires us to make two requests (e.g. for http, it's a HEAD followed by a GET). libcurl is able to condense this into a single call, but lacks support for aborting early when a local file is determined to be up to date.
Thanks to you and your whole team for your work over the years on curl.
View Pull Request: https://github.com/bagder/curl/pull/6
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-01-30