mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-07 23:54:50 +00:00
Properly parse urls that include protocol://
This commit is contained in:
parent
210d532526
commit
c91444055a
@ -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, '@');
|
||||
|
Loading…
Reference in New Issue
Block a user