Commit 35969c68 by Matt Burke

Ignore NULL headers

parent c49126c8
...@@ -213,6 +213,7 @@ static int gen_request( ...@@ -213,6 +213,7 @@ static int gen_request(
if (t->owner->custom_headers) { if (t->owner->custom_headers) {
for (i = 0; i < t->owner->custom_headers->count; i++) { for (i = 0; i < t->owner->custom_headers->count; i++) {
if (t->owner->custom_headers->strings[i])
git_buf_printf(buf, "%s\r\n", t->owner->custom_headers->strings[i]); git_buf_printf(buf, "%s\r\n", t->owner->custom_headers->strings[i]);
} }
} }
......
...@@ -412,6 +412,7 @@ static int winhttp_stream_connect(winhttp_stream *s) ...@@ -412,6 +412,7 @@ static int winhttp_stream_connect(winhttp_stream *s)
if (t->owner->custom_headers) { if (t->owner->custom_headers) {
for (i = 0; i < t->owner->custom_headers->count; i++) { for (i = 0; i < t->owner->custom_headers->count; i++) {
if (t->owner->custom_headers->strings[i]) {
git_buf_clear(&buf); git_buf_clear(&buf);
git_buf_puts(&buf, t->owner->custom_headers->strings[i]); git_buf_puts(&buf, t->owner->custom_headers->strings[i]);
if (git__utf8_to_16(ct, MAX_CONTENT_TYPE_LEN, git_buf_cstr(&buf)) < 0) { if (git__utf8_to_16(ct, MAX_CONTENT_TYPE_LEN, git_buf_cstr(&buf)) < 0) {
...@@ -426,6 +427,7 @@ static int winhttp_stream_connect(winhttp_stream *s) ...@@ -426,6 +427,7 @@ static int winhttp_stream_connect(winhttp_stream *s)
} }
} }
} }
}
/* If requested, disable certificate validation */ /* If requested, disable certificate validation */
if (t->connection_data.use_ssl) { if (t->connection_data.use_ssl) {
......
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