From 475e2a86c9f8cc636f1387dbbeb2416ed1a444d3 Mon Sep 17 00:00:00 2001 From: epoch Date: Sat, 4 Jul 2020 00:17:41 -0500 Subject: literal IPv6 addresses in the domain portion were NOT skipping the leading [ --- uri.h | 1 + 1 file changed, 1 insertion(+) (limited to 'uri.h') diff --git a/uri.h b/uri.h index 966e6ca..04d514f 100644 --- a/uri.h +++ b/uri.h @@ -285,6 +285,7 @@ int urifromline(struct uri *u,char *line) { if((u->port=strchr(u->domain,']')) && *u->domain == '[') {//this is an IPv6 host *u->port=0; u->port++; + u->domain++;//we need to skip the leading [ if(*u->port == ':') { *u->port=0; u->port++;//if it ends up being empty, whatever. that's a URI like: http://host:/path -- cgit v1.2.3