diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2008-05-30 11:09:50 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2008-05-30 11:09:50 +0000 |
commit | f4be61553c38f980d38c7afd7b693def3ec5208c (patch) | |
tree | 93ecd5fe8277bfc4e9b09d44d6293c98235dc37d /content/fetchers/fetch_curl.c | |
parent | ae992eab4d58f35465976ddb7603f37573370b84 (diff) | |
download | netsurf-f4be61553c38f980d38c7afd7b693def3ec5208c.tar.gz netsurf-f4be61553c38f980d38c7afd7b693def3ec5208c.tar.bz2 |
Fix handling of cache control data
svn path=/trunk/netsurf/; revision=4227
Diffstat (limited to 'content/fetchers/fetch_curl.c')
-rw-r--r-- | content/fetchers/fetch_curl.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/content/fetchers/fetch_curl.c b/content/fetchers/fetch_curl.c index 7c2ca5c8d..465af2c9c 100644 --- a/content/fetchers/fetch_curl.c +++ b/content/fetchers/fetch_curl.c @@ -1132,11 +1132,12 @@ bool fetch_curl_process_headers(struct curl_fetch_info *f) if (url_path && stat(url_path, &s) == 0) { /* file: URL and file exists */ /* create etag */ - /*free(f->cachedata.etag); - f->cachedata.etag = malloc(13); - if (f->cachedata.etag) - sprintf(f->cachedata.etag, - "\"%10d\"", (int)s.st_mtime);*/ + char etag_buf[20]; + snprintf(etag_buf, sizeof etag_buf, + "ETag: \"%10d\"", (int) s.st_mtime); + /* And send it to the header handler */ + fetch_send_callback(FETCH_HEADER, f->fetch_handle, etag_buf, + strlen(etag_buf)); /* don't set last modified time so as to ensure that local * files are revalidated at all times. */ |