Author: jmb
Date: Sun Aug 29 12:41:54 2010
New Revision: 10721
URL:
http://source.netsurf-browser.org?rev=10721&view=rev
Log:
Fix bug #3055480: properly compare URLs, instead of erroneously assuming that strcasecmp
is the correct answer.
Modified:
trunk/netsurf/content/llcache.c
Modified: trunk/netsurf/content/llcache.c
URL:
http://source.netsurf-browser.org/trunk/netsurf/content/llcache.c?rev=107...
==============================================================================
--- trunk/netsurf/content/llcache.c (original)
+++ trunk/netsurf/content/llcache.c Sun Aug 29 12:41:54 2010
@@ -695,9 +695,13 @@
/* 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)) {