diff options
author | Ben Straub <bs@github.com> | 2013-08-08 08:48:57 -0700 |
---|---|---|
committer | Ben Straub <bs@github.com> | 2013-08-08 08:48:57 -0700 |
commit | aaefbdeea205fbea2005113a9743c81721a42b36 (patch) | |
tree | 8054ef69384be26ce48c6f6d8c8fbfc947eeb445 /src/transports | |
parent | 2c0128ee79243d32e60f19e60acc2e297c1761d6 (diff) | |
download | libgit2-aaefbdeea205fbea2005113a9743c81721a42b36.tar.gz |
Discriminate path-specific and general UTF-X conversions
Diffstat (limited to 'src/transports')
-rw-r--r-- | src/transports/winhttp.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/transports/winhttp.c b/src/transports/winhttp.c index 359ab5f5e..5c55c10f1 100644 --- a/src/transports/winhttp.c +++ b/src/transports/winhttp.c @@ -264,7 +264,7 @@ static int winhttp_stream_connect(winhttp_stream *s) if (git_buf_printf(&buf, "Content-Type: application/x-git-%s-request", s->service) < 0) goto on_error; - git__utf8_to_16(ct, git_buf_cstr(&buf)); + git__utf8_to_16(ct, MAX_CONTENT_TYPE_LEN, git_buf_cstr(&buf)); if (!WinHttpAddRequestHeaders(s->request, ct, (ULONG) -1L, WINHTTP_ADDREQ_FLAG_ADD)) { giterr_set(GITERR_OS, "Failed to add a header to the request"); @@ -593,7 +593,7 @@ replay: else snprintf(expected_content_type_8, MAX_CONTENT_TYPE_LEN, "application/x-git-%s-advertisement", s->service); - git__utf8_to_16(expected_content_type, expected_content_type_8); + git__utf8_to_16(expected_content_type, MAX_CONTENT_TYPE_LEN, expected_content_type_8); content_type_length = sizeof(content_type); if (!WinHttpQueryHeaders(s->request, @@ -920,7 +920,7 @@ static int winhttp_connect( return -1; /* Prepare host */ - git__utf8_to_16(host, t->host); + git__win32_path_utf8_to_16(host, t->host); /* Establish session */ t->session = WinHttpOpen( |