From c91444055ab76f0f638a7926d8be8418fef2db0d Mon Sep 17 00:00:00 2001 From: Ben Straub Date: Mon, 23 Sep 2013 11:37:35 -0700 Subject: [PATCH] Properly parse urls that include protocol:// --- src/netops.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/netops.c b/src/netops.c index 803c2696a..6777ee51b 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, '@');