summaryrefslogtreecommitdiff
path: root/utils/nsurl.c
diff options
context:
space:
mode:
authorMichael Drake <tlsa@netsurf-browser.org>2011-10-14 13:54:52 +0000
committerMichael Drake <tlsa@netsurf-browser.org>2011-10-14 13:54:52 +0000
commit9bf80e3788755a1f823802494233b4e06a3f8b87 (patch)
tree35ab3e7ae01e33d08d76e323188fb19055af51e0 /utils/nsurl.c
parent57e3c0748cd3b8ede5ffd721c876a734e264779f (diff)
downloadnetsurf-9bf80e3788755a1f823802494233b4e06a3f8b87.tar.gz
netsurf-9bf80e3788755a1f823802494233b4e06a3f8b87.tar.bz2
Improve bad URL handling.
svn path=/trunk/netsurf/; revision=13045
Diffstat (limited to 'utils/nsurl.c')
-rw-r--r--utils/nsurl.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/nsurl.c b/utils/nsurl.c
index c184758c9..f2f6e3bfe 100644
--- a/utils/nsurl.c
+++ b/utils/nsurl.c
@@ -286,6 +286,7 @@ static void nsurl__get_string_markers(const char const *url_s,
*/
if (*pos != '\0' &&
((joining == false && is_http == true && *pos != '/') ||
+ (joining == true && is_http == true && *pos == '/') ||
(*pos == '/' && *(pos + 1) == '/'))) {
/* Skip over leading slashes */
if (is_http == false) {
@@ -1003,6 +1004,7 @@ void nsurl__test(void)
/* Extra tests */
{ " g", "http://a/b/c/g" },
+ { " http:/b/c", "http://b/c" },
/* [1] Extra slash beyond rfc3986 5.4.1 example, since we're
* testing normalisation in addition to joining */
/* [2] Using the strict parsers option */