Enable use of HTTP cache headers in curl plugin
authorDan McGee <dan@archlinux.org>
Thu, 14 Oct 2010 03:00:46 +0000 (22:00 -0500)
committerBrenden Matthews <brenden@diddyinc.com>
Thu, 14 Oct 2010 23:59:54 +0000 (16:59 -0700)
commitf055cfefad989d6c8136bde4aee7e6e577403ef5
tree61f389d66e8d4d89cf1daf91760847a2e864844e
parent8dd9b91bb2751abccc02b53cefd0ab8f0e3b957d
Enable use of HTTP cache headers in curl plugin

This will allow us to get 304 responses back from remote URLs that we are
grabbing using the curl, weather, and rss plugins. The first time we fetch a
resource, we will always get the full content, but from there on out we will
store any provided 'Etag' or 'Last-Modified' header, and submit these on the
next request. If we get a 304 response back, we won't have to do any work at
all.

This benefits both us (bandwidth and parsing savings) and remote URLs (we
actually make an attempt to not retrieve the same resource over and over
again).

Signed-off-by: Brenden Matthews <brenden@diddyinc.com>
src/ccurl_thread.c
src/ccurl_thread.h