Fix the double-slash URL test.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
Signed-off-by: Geoff Levand <geoff@infradead.org>
url->port = NULL;
url->host = talloc_strndup(url, p, path - p);
}
url->port = NULL;
url->host = talloc_strndup(url, p, path - p);
}
+
+ /* remove multiple leading slashes */
+ for (; *path && *(path+1) == '/'; path++)
+ ;
+
url->path = talloc_strdup(url, path);
}
url->path = talloc_strdup(url, path);
}