From 78f3bbaed327696fa334f0de72cc4088e20bdd64 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 29 Aug 2010 17:41:54 +0000 Subject: Fix bug #3055480: properly compare URLs, instead of erroneously assuming that strcasecmp is the correct answer. svn path=/trunk/netsurf/; revision=10721 --- content/llcache.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'content/llcache.c') diff --git a/content/llcache.c b/content/llcache.c index c6049fe63..a4dd96d27 100644 --- a/content/llcache.c +++ b/content/llcache.c @@ -695,9 +695,13 @@ nserror llcache_object_retrieve_from_cache(const char *url, uint32_t flags, /* Search for the most recently fetched matching object */ for (obj = llcache_cached_objects; obj != NULL; obj = obj->next) { - if (strcasecmp(obj->url, url) == 0 && (newest == NULL || - obj->cache.req_time > newest->cache.req_time)) + bool match; + + if (url_compare(obj->url, url, true, &match) == URL_FUNC_OK && + match == true && (newest == NULL || + obj->cache.req_time > newest->cache.req_time)) { newest = obj; + } } if (newest != NULL && llcache_object_is_fresh(newest)) { -- cgit v1.2.3