summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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