summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2018-03-03 21:47:22 +0000
committerEdward Thomson <ethomson@edwardthomson.com>2018-03-19 16:08:01 -0700
commit0e4f3d9d46609bb12ea2a79da77f0b8f2ae48d8f (patch)
tree89dbab7d4d7b1fece94a15a7640f2aa8cbf34690
parent05551ca091bed2aa1f557b848c7602d036961bd3 (diff)
downloadlibgit2-0e4f3d9d46609bb12ea2a79da77f0b8f2ae48d8f.tar.gz
gitno_extract_url_parts: decode hostnames
RFC 3986 says that hostnames can be percent encoded. Percent decode hostnames in our URLs.
-rw-r--r--src/netops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/netops.c b/src/netops.c
index c74faffb8..fa20cbaf2 100644
--- a/src/netops.c
+++ b/src/netops.c
@@ -238,7 +238,7 @@ int gitno_extract_url_parts(
if (has_host) {
const char *url_host = url + u.field_data[UF_HOST].off;
size_t url_host_len = u.field_data[UF_HOST].len;
- git_buf_put(&host, url_host, url_host_len);
+ git_buf_decode_percent(&host, url_host, url_host_len);
}
if (has_port) {