mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-03-16 20:12:53 +03:00
Fix host/path with no scheme.
svn path=/trunk/netsurf/; revision=12935
This commit is contained in:
parent
3049f37e24
commit
a522d9ff14
@ -196,9 +196,10 @@ static void nsurl__get_string_markers(const char const *url_s,
|
||||
* If this URL is not getting joined, we are less strict in the case of
|
||||
* http(s) and will accept any number of slashes, including 0.
|
||||
*/
|
||||
if (*pos != '\0' && ((joining == false && is_http == true) ||
|
||||
if (*pos != '\0' &&
|
||||
((joining == false && is_http == true && *pos != '/') ||
|
||||
(*pos == '/' && *(pos + 1) == '/'))) {
|
||||
/* Skip over leading slashes */
|
||||
/* Skip over leading slashes */LOG(("test c: %c", *pos));
|
||||
if (is_http == false) {
|
||||
if (*pos == '/') pos++;
|
||||
if (*pos == '/') pos++;
|
||||
@ -236,7 +237,8 @@ static void nsurl__get_string_markers(const char const *url_s,
|
||||
|
||||
marker.path = pos - url_s;
|
||||
|
||||
} else if (*pos == '\0' && joining == false && is_http == true) {
|
||||
} else if ((*pos == '\0' || *pos == '/') &&
|
||||
joining == false && is_http == true) {
|
||||
marker.path = pos - url_s;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user