diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2004-02-02 23:38:02 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2004-02-02 23:38:02 +0000 |
commit | e8290de904d68a5438d9ca4327d9eaa0be7409a4 (patch) | |
tree | c6b3af8a5cc2035afc4ff3c886bace369435efac | |
parent | 3d17484046348aa6f4c44244b0b6b2de19ce721b (diff) | |
download | netsurf-e8290de904d68a5438d9ca4327d9eaa0be7409a4.tar.gz netsurf-e8290de904d68a5438d9ca4327d9eaa0be7409a4.tar.bz2 |
[project @ 2004-02-02 23:38:02 by jmb]
Fix issues highlighted by teoma.com
svn path=/import/netsurf/; revision=531
-rw-r--r-- | content/fetch.c | 4 | ||||
-rw-r--r-- | desktop/browser.c | 7 |
2 files changed, 10 insertions, 1 deletions
diff --git a/content/fetch.c b/content/fetch.c index 97e0473b8..ac47b4a46 100644 --- a/content/fetch.c +++ b/content/fetch.c @@ -613,6 +613,7 @@ bool fetch_process_headers(struct fetch *f) { long http_code; const char *type; + char *temp; CURLcode code; f->had_headers = true; @@ -623,6 +624,9 @@ bool fetch_process_headers(struct fetch *f) /* handle HTTP redirects (3xx response codes) */ if (300 <= http_code && http_code < 400 && f->location != 0) { + temp = curl_unescape(f->location, strlen(f->location)); + xfree(f->location); + f->location = temp; LOG(("FETCH_REDIRECT, '%s'", f->location)); f->callback(FETCH_REDIRECT, f->p, f->location, 0); return true; diff --git a/desktop/browser.c b/desktop/browser.c index 275de9558..253a492ad 100644 --- a/desktop/browser.c +++ b/desktop/browser.c @@ -1677,7 +1677,12 @@ void browser_form_submit(struct browser_window *bw, struct form *form, case method_GET: data = form_url_encode(success); url = xcalloc(1, strlen(form->action) + strlen(data) + 2); - sprintf(url, "%s?%s", form->action, data); + if(form->action[strlen(form->action)-1] == '?') { + sprintf(url, "%s%s", form->action, data); + } + else { + sprintf(url, "%s?%s", form->action, data); + } url1 = url_join(url, base); if (!url1) break; |