From 1c85bf04293cfba663c5170bbe762825b7e72af1 Mon Sep 17 00:00:00 2001 From: James Bursa Date: Tue, 2 Mar 2004 18:02:41 +0000 Subject: [project @ 2004-03-02 18:02:17 by bursa] Add new url functions and modify to use them. svn path=/import/netsurf/; revision=578 --- desktop/browser.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) (limited to 'desktop/browser.c') diff --git a/desktop/browser.c b/desktop/browser.c index d75b1c33f..6aee554ad 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -30,6 +30,7 @@ #include "netsurf/render/layout.h" #include "netsurf/utils/log.h" #include "netsurf/utils/messages.h" +#include "netsurf/utils/url.h" #include "netsurf/utils/utils.h" @@ -152,12 +153,16 @@ void browser_window_go_post(struct browser_window *bw, const char *url, browser_window_set_status(bw, messages_get("Loading")); bw->history_add = history_add; bw->time0 = clock(); - c = fetchcache(url, 0, - browser_window_callback, bw, 0, - gui_window_get_width(bw->window), 0, - false, - post_urlenc, post_multipart, - true); + if (strncmp(url, "about:", 6) == 0) + c = about_create(url, browser_window_callback, bw, 0, + gui_window_get_width(bw->window), 0); + else + c = fetchcache(url, 0, + browser_window_callback, bw, 0, + gui_window_get_width(bw->window), 0, + false, + post_urlenc, post_multipart, + true); if (!c) { browser_window_set_status(bw, messages_get("FetchFailed")); return; @@ -1743,6 +1748,8 @@ void browser_form_submit(struct browser_window *bw, struct form *form, case method_POST_MULTIPART: url = url_join(form->action, base); + if (!url) + break; browser_window_go_post(bw, url, 0, success, true); break; -- cgit v1.2.3