Commit 0e4f3d9d by Edward Thomson

gitno_extract_url_parts: decode hostnames

RFC 3986 says that hostnames can be percent encoded.  Percent decode
hostnames in our URLs.
parent 05551ca0
...@@ -238,7 +238,7 @@ int gitno_extract_url_parts( ...@@ -238,7 +238,7 @@ int gitno_extract_url_parts(
if (has_host) { if (has_host) {
const char *url_host = url + u.field_data[UF_HOST].off; const char *url_host = url + u.field_data[UF_HOST].off;
size_t url_host_len = u.field_data[UF_HOST].len; 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) { if (has_port) {
......
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