diff options
author | Daniel Silverstone <dsilvers@digital-scurf.org> | 2019-08-02 12:22:30 +0100 |
---|---|---|
committer | Daniel Silverstone <dsilvers@digital-scurf.org> | 2019-08-02 12:22:30 +0100 |
commit | d196dee05b8dc5245da32629bc8f7759cf55a62a (patch) | |
tree | 8af1839ad0ac9667c99ab035178071fd4eedcab9 /content/llcache.c | |
parent | 9742a8317f66cc2802b3d92456ec0516a6de8c79 (diff) | |
download | netsurf-d196dee05b8dc5245da32629bc8f7759cf55a62a.tar.gz netsurf-d196dee05b8dc5245da32629bc8f7759cf55a62a.tar.bz2 |
llcache: Use last_modified instead of date
When sending an If-Modified-Since header we should use the
`last_modified` rather than the `date` property of the cached
object in order to not incorrectly assume things have a modification
date when they do not.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Diffstat (limited to 'content/llcache.c')
-rw-r--r-- | content/llcache.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/content/llcache.c b/content/llcache.c index 625e810ff..ff21d29ab 100644 --- a/content/llcache.c +++ b/content/llcache.c @@ -860,7 +860,7 @@ static nserror llcache_object_refetch(llcache_object *object) header_idx++; } - if (object->cache.date != 0) { + if (object->cache.last_modified != 0) { /* Maximum length of an RFC 1123 date is 29 bytes */ const size_t len = SLEN("If-Modified-Since: ") + 29 + 1; @@ -873,7 +873,7 @@ static nserror llcache_object_refetch(llcache_object *object) } snprintf(headers[header_idx], len, "If-Modified-Since: %s", - rfc1123_date(object->cache.date)); + rfc1123_date(object->cache.last_modified)); header_idx++; } |