From f1b59814f8da2f3e235d47adfb332edf8a093b31 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Fri, 26 Dec 2003 00:17:55 +0000 Subject: [project @ 2003-12-26 00:17:55 by bursa] New url_join using liburi, . svn path=/import/netsurf/; revision=441 --- content/fetchcache.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'content/fetchcache.c') diff --git a/content/fetchcache.c b/content/fetchcache.c index 28c098034..63bd5be35 100644 --- a/content/fetchcache.c +++ b/content/fetchcache.c @@ -147,8 +147,12 @@ void fetchcache_callback(fetch_msg msg, void *p, char *data, unsigned long size) /* redirect URLs must be absolute by HTTP/1.1, but many sites send * relative ones: treat them as relative to requested URL */ url = url_join(data, c->url); - content_broadcast(c, CONTENT_MSG_REDIRECT, url); - xfree(url); + if (url) { + content_broadcast(c, CONTENT_MSG_REDIRECT, url); + xfree(url); + } else { + content_broadcast(c, CONTENT_MSG_ERROR, "Bad redirect"); + } if (c->cache) cache_destroy(c); content_destroy(c); -- cgit v1.2.3