From d9575d3bd5db06d069baad30cf30ab3fbbb3a3c0 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Mon, 18 Apr 2005 21:40:29 +0000 Subject: [project @ 2005-04-18 21:40:29 by bursa] Fix bug with redirected contents being reused (as triggered by looping redirects). svn path=/import/netsurf/; revision=1670 --- content/fetchcache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/content/fetchcache.c b/content/fetchcache.c index 61f391e84..617a4ead5 100644 --- a/content/fetchcache.c +++ b/content/fetchcache.c @@ -313,6 +313,9 @@ void fetchcache_callback(fetch_msg msg, void *p, const char *data, /* redirect URLs must be absolute by HTTP/1.1, but many sites send * relative ones: treat them as relative to requested URL */ result = url_join(data, c->url, &url); + /* set the status to ERROR so that the content is + * destroyed in content_clean() */ + c->status = CONTENT_STATUS_ERROR; if (result == URL_FUNC_OK) { msg_data.redirect = url; content_broadcast(c, CONTENT_MSG_REDIRECT, msg_data); @@ -321,9 +324,6 @@ void fetchcache_callback(fetch_msg msg, void *p, const char *data, msg_data.error = messages_get("BadRedirect"); content_broadcast(c, CONTENT_MSG_ERROR, msg_data); } - /* set the status to ERROR so that the content is - * destroyed in content_clean() */ - c->status = CONTENT_STATUS_ERROR; break; #ifdef WITH_AUTH case FETCH_AUTH: -- cgit v1.2.3