summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2005-04-18 21:40:29 +0000
committerJames Bursa <james@netsurf-browser.org>2005-04-18 21:40:29 +0000
commitd9575d3bd5db06d069baad30cf30ab3fbbb3a3c0 (patch)
tree736c1df1f7b26a52ac412608963ade62467d38c3
parent0ebcc1ea1df9626e1edd02100aff170b44958cf0 (diff)
downloadnetsurf-d9575d3bd5db06d069baad30cf30ab3fbbb3a3c0.tar.gz
netsurf-d9575d3bd5db06d069baad30cf30ab3fbbb3a3c0.tar.bz2
[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
-rw-r--r--content/fetchcache.c6
1 files 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: