summaryrefslogtreecommitdiff
path: root/content/fetchcache.c
diff options
context:
space:
mode:
Diffstat (limited to 'content/fetchcache.c')
-rw-r--r--content/fetchcache.c6
1 files changed, 5 insertions, 1 deletions
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,