Fix handling of no scheme

svn path=/trunk/netsurf/; revision=13055
This commit is contained in:
John Mark Bell 2011-10-15 11:51:54 +00:00
parent 8f554bb0e5
commit ee930d97e4
2 changed files with 4 additions and 0 deletions

View File

@ -39,6 +39,8 @@ static const struct test_pairs create_tests[] = {
{ "http:/a/b", "http://a/b" },
{ "http://a", "http://a/" },
{ "http://a/b", "http://a/b" },
{ "www.example.org", "http://www.example.org/" },
{ "www.example.org/x", "http://www.example.org/x" },
{ "http://www.netsurf-browser.org:8080/",
"http://www.netsurf-browser.org:8080/" },

View File

@ -263,6 +263,8 @@ static void nsurl__get_string_markers(const char const *url_s,
} else {
/* Not found a scheme */
pos = url_s + marker.start;
if (joining == false) {
/* Assuming no scheme == http */
is_http = true;