From b7af14b591707b28d9d99c77a7d5579e4d176c2a Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Sun, 2 Jul 2006 22:34:04 +0000 Subject: Implement component-wise URL comparison svn path=/trunk/netsurf/; revision=2697 --- content/fetchcache.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'content/fetchcache.c') diff --git a/content/fetchcache.c b/content/fetchcache.c index 7153c629b..1d0018d97 100644 --- a/content/fetchcache.c +++ b/content/fetchcache.c @@ -419,9 +419,13 @@ void fetchcache_callback(fetch_msg msg, void *p, const void *data, * destroyed in content_clean() */ c->status = CONTENT_STATUS_ERROR; if (result == URL_FUNC_OK) { + bool same; + + result = url_compare(c->url, url, &same); + /* check that we're not attempting to * redirect to the same URL */ - if (strcasecmp(c->url, url) == 0) { + if (result != URL_FUNC_OK || same) { msg_data.error = messages_get("BadRedirect"); content_broadcast(c, -- cgit v1.2.3