mirror of
https://git.proxmox.com/git/libgit2
synced 2025-05-29 20:42:23 +00:00
Put the extra headers on the connection_data instead
This commit is contained in:
parent
c3733e5641
commit
6af6e69009
@ -70,6 +70,7 @@ typedef struct gitno_connection_data {
|
|||||||
char *user;
|
char *user;
|
||||||
char *pass;
|
char *pass;
|
||||||
bool use_ssl;
|
bool use_ssl;
|
||||||
|
git_strarray *extra_headers;
|
||||||
} gitno_connection_data;
|
} gitno_connection_data;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -54,7 +54,6 @@ typedef struct {
|
|||||||
char *redirect_url;
|
char *redirect_url;
|
||||||
const char *verb;
|
const char *verb;
|
||||||
char *chunk_buffer;
|
char *chunk_buffer;
|
||||||
git_strarray *extra_headers;
|
|
||||||
unsigned chunk_buffer_len;
|
unsigned chunk_buffer_len;
|
||||||
unsigned sent_request : 1,
|
unsigned sent_request : 1,
|
||||||
received_response : 1,
|
received_response : 1,
|
||||||
@ -212,9 +211,9 @@ static int gen_request(
|
|||||||
} else
|
} else
|
||||||
git_buf_puts(buf, "Accept: */*\r\n");
|
git_buf_puts(buf, "Accept: */*\r\n");
|
||||||
|
|
||||||
if (s->extra_headers) {
|
if (t->connection_data.extra_headers) {
|
||||||
for (i = 0; i < s->extra_headers->count; i++) {
|
for (i = 0; i < t->connection_data.extra_headers->count; i++) {
|
||||||
git_buf_puts(buf, s->extra_headers->strings[i]);
|
git_buf_puts(buf, t->connection_data.extra_headers->strings[i]);
|
||||||
git_buf_puts(buf, "\r\n");
|
git_buf_puts(buf, "\r\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user