summaryrefslogtreecommitdiff
path: root/uri.h
diff options
context:
space:
mode:
authorepoch <epoch@hacking.allowed.org>2020-07-04 00:17:41 -0500
committerepoch <epoch@hacking.allowed.org>2020-07-04 00:17:41 -0500
commit475e2a86c9f8cc636f1387dbbeb2416ed1a444d3 (patch)
treed45235a5748a7999f968d11c09a172140db0e1bb /uri.h
parentbb7df18fefee862f7aa2697a64b95cab37ac7a3c (diff)
downloaduritools-475e2a86c9f8cc636f1387dbbeb2416ed1a444d3.tar.gz
uritools-475e2a86c9f8cc636f1387dbbeb2416ed1a444d3.zip
literal IPv6 addresses in the domain portion were NOT skipping the leading [
Diffstat (limited to 'uri.h')
-rw-r--r--uri.h1
1 files changed, 1 insertions, 0 deletions
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