diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2010-04-11 14:01:11 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2010-04-11 14:01:11 +0000 |
commit | 40bac34ffd6d0e0483defd0ffe233648e0e7faa6 (patch) | |
tree | 15cf100d5e016184ba4d7d5d5560f24fc65c3c76 | |
parent | 758190f37b1483cfe05d508a9f3387cbe5c0f1ff (diff) | |
download | netsurf-40bac34ffd6d0e0483defd0ffe233648e0e7faa6.tar.gz netsurf-40bac34ffd6d0e0483defd0ffe233648e0e7faa6.tar.bz2 |
Bail out if we're redirected to an URL we can't handle
svn path=/trunk/netsurf/; revision=10351
-rw-r--r-- | content/llcache.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/content/llcache.c b/content/llcache.c index 6fdcdf859..b09f1bab6 100644 --- a/content/llcache.c +++ b/content/llcache.c @@ -1642,7 +1642,11 @@ nserror llcache_fetch_redirect(llcache_object *object, const char *target, /** \todo Ensure that redirects to file:/// don't happen? */ - /** \todo What happens if we've no way of handling this URL? */ + /* Bail out if we've no way of handling this URL */ + if (fetch_can_fetch(url) == false) { + free(url); + return NSERROR_OK; + } /** \todo All the magical processing for the various redirect types */ if (http_code == 301 || http_code == 302 || http_code == 303) { |