diff options
author | Junio C Hamano <gitster@pobox.com> | 2010-06-24 13:36:30 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-06-24 13:36:30 -0700 |
commit | 3c73a1d57f9319dbbaf882835608ad421c8b9600 (patch) | |
tree | 1071d14adf772c9bd304d322071a58de004f80ed | |
parent | ce83eda15554ffd859ecc9f4c427303d460dab60 (diff) | |
download | git-3c73a1d57f9319dbbaf882835608ad421c8b9600.tar.gz |
url_decode: URL scheme ends with a colon and does not require a slash
Signed-off-by: Junio C Hamano <gitster@pobox.com>
-rw-r--r-- | url.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -103,12 +103,12 @@ static char *url_decode_internal(const char **query, const char *stop_at, struct char *url_decode(const char *url) { struct strbuf out = STRBUF_INIT; - const char *slash = strchr(url, '/'); + const char *colon = strchr(url, ':'); /* Skip protocol part if present */ - if (slash && url < slash) { - strbuf_add(&out, url, slash - url); - url = slash; + if (colon && url < colon) { + strbuf_add(&out, url, colon - url); + url = colon; } return url_decode_internal(&url, NULL, &out); } |