diff options
author | Vicent Marti <vicent@github.com> | 2014-08-07 18:00:57 +0200 |
---|---|---|
committer | Vicent Marti <vicent@github.com> | 2014-08-07 18:00:57 +0200 |
commit | 8f759ac0b373eea9dcec680524a68a527d637937 (patch) | |
tree | 99ca32351711018c855ac06e3859c5be9ed86ea5 /src/transports/winhttp.c | |
parent | e0af2517bf9055441cfa34c45087c0ee9defe7e9 (diff) | |
parent | 07d03d31456899a39f97425a3d09903d7a54ed3f (diff) | |
download | libgit2-8f759ac0b373eea9dcec680524a68a527d637937.tar.gz |
Merge pull request #2471 from jacquesg/compatibility-cleanup
Compatibility/Portability cleanup
Diffstat (limited to 'src/transports/winhttp.c')
-rw-r--r-- | src/transports/winhttp.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/transports/winhttp.c b/src/transports/winhttp.c index bd9509cd4..32641cd64 100644 --- a/src/transports/winhttp.c +++ b/src/transports/winhttp.c @@ -36,6 +36,10 @@ #define CACHED_POST_BODY_BUF_SIZE 4096 #define UUID_LENGTH_CCH 32 +#ifndef WINHTTP_IGNORE_REQUEST_TOTAL_LENGTH +#define WINHTTP_IGNORE_REQUEST_TOTAL_LENGTH 0 +#endif + static const char *prefix_http = "http://"; static const char *prefix_https = "https://"; static const char *upload_pack_service = "upload-pack"; @@ -745,9 +749,9 @@ replay: /* Verify that we got the correct content-type back */ if (post_verb == s->verb) - snprintf(expected_content_type_8, MAX_CONTENT_TYPE_LEN, "application/x-git-%s-result", s->service); + p_snprintf(expected_content_type_8, MAX_CONTENT_TYPE_LEN, "application/x-git-%s-result", s->service); else - snprintf(expected_content_type_8, MAX_CONTENT_TYPE_LEN, "application/x-git-%s-advertisement", s->service); + p_snprintf(expected_content_type_8, MAX_CONTENT_TYPE_LEN, "application/x-git-%s-advertisement", s->service); if (git__utf8_to_16(expected_content_type, MAX_CONTENT_TYPE_LEN, expected_content_type_8) < 0) { giterr_set(GITERR_OS, "Failed to convert expected content-type to wide characters"); |