SoupCache: some issues in SoupCache (3/3)
authorSergio Villar Senin <svillar@igalia.com>
Fri, 27 Jan 2012 17:56:21 +0000 (18:56 +0100)
committerSergio Villar Senin <svillar@igalia.com>
Tue, 14 Feb 2012 11:22:02 +0000 (12:22 +0100)
Check that cache control is not blank to prevent some criticals.

https://bugzilla.gnome.org/show_bug.cgi?id=668865

libsoup/soup-cache.c

index 4002a06..6ee6dd9 100644 (file)
@@ -164,7 +164,7 @@ get_cacheability (SoupCache *cache, SoupMessage *msg)
                return SOUP_CACHE_UNCACHEABLE;
 
        cache_control = soup_message_headers_get (msg->response_headers, "Cache-Control");
-       if (cache_control) {
+       if (cache_control && *cache_control) {
                GHashTable *hash;
                SoupCachePrivate *priv = SOUP_CACHE_GET_PRIVATE (cache);