diff options
author | Dan Winship <danw@gnome.org> | 2011-01-25 12:23:08 -0500 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2011-01-31 16:33:33 -0500 |
commit | d9bf1c08c846196c4c2932a1f56402614d4d19fe (patch) | |
tree | 6bc01b7dc9b7e6c4bd061a7fdb9615cee891e271 | |
parent | ea5b7457064727ae96b97ca5ad93d23cee1ba12e (diff) | |
download | libsoup-d9bf1c08c846196c4c2932a1f56402614d4d19fe.tar.gz |
soup-cache: fix a warning (and a bug)
If a request specifies "Cache-Control: max-age=0", revalidate the
response, but don't mark the cache entry as "must_revalidate", since
the need for revalidation applies only to the current request.
https://bugzilla.gnome.org/show_bug.cgi?id=640556
-rw-r--r-- | libsoup/soup-cache.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/libsoup/soup-cache.c b/libsoup/soup-cache.c index f7d3bfb5..25c0709d 100644 --- a/libsoup/soup-cache.c +++ b/libsoup/soup-cache.c @@ -1254,7 +1254,6 @@ soup_cache_has_response (SoupCache *cache, SoupMessage *msg) SoupCacheEntry *entry; const char *cache_control, *pragma; gpointer value; - gboolean must_revalidate; int max_age, max_stale, min_fresh; GList *lru_item, *item; @@ -1312,7 +1311,6 @@ soup_cache_has_response (SoupCache *cache, SoupMessage *msg) * directives that would prevent its use. */ - must_revalidate = FALSE; max_age = max_stale = min_fresh = -1; /* For HTTP 1.0 compatibility. RFC2616 section 14.9.4 @@ -1340,7 +1338,7 @@ soup_cache_has_response (SoupCache *cache, SoupMessage *msg) /* Forcing cache revalidaton */ if (!max_age) - entry->must_revalidate = TRUE; + return SOUP_CACHE_RESPONSE_NEEDS_VALIDATION; } /* max-stale can have no value set, we need to use _extended */ |