Skip to content

Commit 0e4f3d9

Browse files
committed
gitno_extract_url_parts: decode hostnames
RFC 3986 says that hostnames can be percent encoded. Percent decode hostnames in our URLs.
1 parent 05551ca commit 0e4f3d9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/netops.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ int gitno_extract_url_parts(
238238
if (has_host) {
239239
const char *url_host = url + u.field_data[UF_HOST].off;
240240
size_t url_host_len = u.field_data[UF_HOST].len;
241-
git_buf_put(&host, url_host, url_host_len);
241+
git_buf_decode_percent(&host, url_host, url_host_len);
242242
}
243243

244244
if (has_port) {

0 commit comments

Comments
 (0)