From c9bd6fa9fce386526ea1327adea56128648f3355 Mon Sep 17 00:00:00 2001 From: John Mark Bell Date: Mon, 9 Aug 2004 16:11:58 +0000 Subject: [project @ 2004-08-09 16:11:58 by jmb] Rework the interface of the URL handing module to allow for multiple error types. Modify save_complete URL rewriting appropriately. svn path=/import/netsurf/; revision=1206 --- content/fetchcache.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'content/fetchcache.c') diff --git a/content/fetchcache.c b/content/fetchcache.c index e22a8ae5b..02ce109b1 100644 --- a/content/fetchcache.c +++ b/content/fetchcache.c @@ -206,6 +206,7 @@ void fetchcache_callback(fetch_msg msg, void *p, const char *data, char **params; unsigned int i; union content_msg_data msg_data; + url_func_result result; switch (msg) { case FETCH_TYPE: @@ -283,8 +284,8 @@ void fetchcache_callback(fetch_msg msg, void *p, const char *data, c->fetch = 0; /* 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); - if (url) { + result = url_join(data, c->url, &url); + if (result == URL_FUNC_OK) { msg_data.redirect = url; content_broadcast(c, CONTENT_MSG_REDIRECT, msg_data); free(url); -- cgit v1.2.3