Properly parse urls that include protocol://
diff --git a/src/netops.c b/src/netops.c
index 803c269..6777ee5 100644
--- a/src/netops.c
+++ b/src/netops.c
@@ -581,7 +581,7 @@ int gitno_extract_url_parts(
const char *url,
const char *default_port)
{
- char *colon, *slash, *at, *end;
+ char *colon, *dblslash, *slash, *at, *end;
const char *start;
/*
@@ -589,6 +589,9 @@ int gitno_extract_url_parts(
* ==> [user[:pass]@]hostname.tld[:port]/resource
*/
+ dblslash = strstr(url, "://");
+ if (dblslash) url = dblslash+3;
+
colon = strchr(url, ':');
slash = strchr(url, '/');
at = strchr(url, '@');