summaryrefslogtreecommitdiff
path: root/content
diff options
context:
space:
mode:
authorJames Bursa <james@netsurf-browser.org>2004-06-23 11:40:29 +0000
committerJames Bursa <james@netsurf-browser.org>2004-06-23 11:40:29 +0000
commitecc3e59fdc1d6ab066abffbe924b8d8376c477da (patch)
tree12a48757e2f048466af376d85b1cef6d87d62c02 /content
parentc5f42cd7c5deb3b39549845685b40e59a4856ea1 (diff)
downloadnetsurf-ecc3e59fdc1d6ab066abffbe924b8d8376c477da.tar.gz
netsurf-ecc3e59fdc1d6ab066abffbe924b8d8376c477da.tar.bz2
[project @ 2004-06-23 11:40:29 by bursa]
Fix destroying of contents after redirects. svn path=/import/netsurf/; revision=996
Diffstat (limited to 'content')
-rw-r--r--content/content.c3
-rw-r--r--content/fetchcache.c6
2 files changed, 8 insertions, 1 deletions
diff --git a/content/content.c b/content/content.c
index 3d3e88702..39b1c7389 100644
--- a/content/content.c
+++ b/content/content.c
@@ -283,7 +283,8 @@ struct content * content_get(const char *url)
struct content *c;
for (c = content_list; c; c = c->next) {
- if (c->fresh && strcmp(c->url, url) == 0)
+ if (c->fresh && c->status != CONTENT_STATUS_ERROR &&
+ strcmp(c->url, url) == 0)
return c;
}
diff --git a/content/fetchcache.c b/content/fetchcache.c
index 65145ab36..fb671ea50 100644
--- a/content/fetchcache.c
+++ b/content/fetchcache.c
@@ -278,6 +278,9 @@ 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:
@@ -286,6 +289,9 @@ void fetchcache_callback(fetch_msg msg, void *p, const char *data,
c->fetch = 0;
msg_data.auth_realm = data;
content_broadcast(c, CONTENT_MSG_AUTH, msg_data);
+ /* set the status to ERROR so that the content is
+ * destroyed in content_clean() */
+ c->status = CONTENT_STATUS_ERROR;
break;
#endif
default: