[project @ 2004-03-10 20:45:27 by bursa]

Normalize url in browser_window_go_post().

svn path=/import/netsurf/; revision=605
This commit is contained in:
James Bursa 2004-03-10 20:45:27 +00:00
parent 5d27672171
commit 24da56f25d

View File

@ -147,22 +147,30 @@ void browser_window_go_post(struct browser_window *bw, const char *url,
bool history_add) bool history_add)
{ {
struct content *c; struct content *c;
char *url2;
url2 = url_normalize(url);
if (!url2) {
LOG(("failed to normalize url %s", url));
return;
}
browser_window_stop(bw); browser_window_stop(bw);
browser_window_set_status(bw, messages_get("Loading")); browser_window_set_status(bw, messages_get("Loading"));
bw->history_add = history_add; bw->history_add = history_add;
bw->time0 = clock(); bw->time0 = clock();
if (strncmp(url, "about:", 6) == 0) if (strncmp(url2, "about:", 6) == 0)
c = about_create(url, browser_window_callback, bw, 0, c = about_create(url2, browser_window_callback, bw, 0,
gui_window_get_width(bw->window), 0); gui_window_get_width(bw->window), 0);
else else
c = fetchcache(url, 0, c = fetchcache(url2, 0,
browser_window_callback, bw, 0, browser_window_callback, bw, 0,
gui_window_get_width(bw->window), 0, gui_window_get_width(bw->window), 0,
false, false,
post_urlenc, post_multipart, post_urlenc, post_multipart,
true); true);
free(url2);
if (!c) { if (!c) {
browser_window_set_status(bw, messages_get("FetchFailed")); browser_window_set_status(bw, messages_get("FetchFailed"));
return; return;