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