Ensure that finished redirection objects in llcache do not get found by subsequent fetch attempts.

svn path=/trunk/netsurf/; revision=10188
This commit is contained in:
Daniel Silverstone 2010-03-28 16:28:28 +00:00
parent cb7412181f
commit 8effd1cb98

View File

@ -1371,6 +1371,11 @@ nserror llcache_fetch_redirect(llcache_object *object, const char *target,
fetch_abort(object->fetch.fetch); fetch_abort(object->fetch.fetch);
object->fetch.fetch = NULL; object->fetch.fetch = NULL;
/* Invalidate the cache control data */
memset(&(object->cache), 0, sizeof(llcache_cache_control));
/* And mark it complete */
object->fetch.state = LLCACHE_FETCH_COMPLETE;
/** \todo Limit redirect depth, or detect cycles */ /** \todo Limit redirect depth, or detect cycles */
/* Make target absolute */ /* Make target absolute */