Commit c9144405 by Ben Straub Committed by Russell Belfer

Properly parse urls that include protocol://

parent 210d5325
...@@ -581,7 +581,7 @@ int gitno_extract_url_parts( ...@@ -581,7 +581,7 @@ int gitno_extract_url_parts(
const char *url, const char *url,
const char *default_port) const char *default_port)
{ {
char *colon, *slash, *at, *end; char *colon, *dblslash, *slash, *at, *end;
const char *start; const char *start;
/* /*
...@@ -589,6 +589,9 @@ int gitno_extract_url_parts( ...@@ -589,6 +589,9 @@ int gitno_extract_url_parts(
* ==> [user[:pass]@]hostname.tld[:port]/resource * ==> [user[:pass]@]hostname.tld[:port]/resource
*/ */
dblslash = strstr(url, "://");
if (dblslash) url = dblslash+3;
colon = strchr(url, ':'); colon = strchr(url, ':');
slash = strchr(url, '/'); slash = strchr(url, '/');
at = strchr(url, '@'); at = strchr(url, '@');
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment