summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Burke <spraints@gmail.com>2015-09-04 09:18:32 -0400
committerMatt Burke <spraints@gmail.com>2015-09-04 09:18:32 -0400
commit6af6e69009e207da851c2b8dff395babddb3bfa4 (patch)
treec59cafc94b68c7a3759335d091169e46a048c331
parentc3733e56410d5bc73fcca0df8e062f84a0565f90 (diff)
downloadlibgit2-6af6e69009e207da851c2b8dff395babddb3bfa4.tar.gz
Put the extra headers on the connection_data instead
-rw-r--r--src/netops.h1
-rw-r--r--src/transports/http.c7
2 files changed, 4 insertions, 4 deletions
diff --git a/src/netops.h b/src/netops.h
index b7170a0f2..ea1072518 100644
--- a/src/netops.h
+++ b/src/netops.h
@@ -70,6 +70,7 @@ typedef struct gitno_connection_data {
char *user;
char *pass;
bool use_ssl;
+ git_strarray *extra_headers;
} gitno_connection_data;
/*
diff --git a/src/transports/http.c b/src/transports/http.c
index f9e5da2b1..d348310c1 100644
--- a/src/transports/http.c
+++ b/src/transports/http.c
@@ -54,7 +54,6 @@ typedef struct {
char *redirect_url;
const char *verb;
char *chunk_buffer;
- git_strarray *extra_headers;
unsigned chunk_buffer_len;
unsigned sent_request : 1,
received_response : 1,
@@ -212,9 +211,9 @@ static int gen_request(
} else
git_buf_puts(buf, "Accept: */*\r\n");
- if (s->extra_headers) {
- for (i = 0; i < s->extra_headers->count; i++) {
- git_buf_puts(buf, s->extra_headers->strings[i]);
+ if (t->connection_data.extra_headers) {
+ for (i = 0; i < t->connection_data.extra_headers->count; i++) {
+ git_buf_puts(buf, t->connection_data.extra_headers->strings[i]);
git_buf_puts(buf, "\r\n");
}
}