mirror of
https://github.com/netsurf-browser/netsurf
synced 2024-12-23 04:26:50 +03:00
Make urldb_add_url IPv6-aware
svn path=/trunk/netsurf/; revision=10990
This commit is contained in:
parent
73ace49c5a
commit
ab704ba7a7
@ -791,13 +791,14 @@ bool urldb_add_url(const char *url)
|
||||
host++;
|
||||
|
||||
/* get port and remove from host */
|
||||
colon = strrchr(host, ':');
|
||||
if (!colon) {
|
||||
port = 0;
|
||||
} else {
|
||||
if (host[strlen(host)] != ']') {
|
||||
colon = strrchr(host, ':');
|
||||
if (colon) {
|
||||
*colon = '\0';
|
||||
port = atoi(colon + 1);
|
||||
}
|
||||
}
|
||||
|
||||
/* Get host entry */
|
||||
if (strcasecmp(components.scheme, "file") == 0)
|
||||
|
Loading…
Reference in New Issue
Block a user