Pull extra_http_headers from the git_remote
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
diff --git a/src/remote.c b/src/remote.c
index 7404bf4..b6fb87e 100644
--- a/src/remote.c
+++ b/src/remote.c
@@ -1643,6 +1643,8 @@ void git_remote_free(git_remote *remote)
free_refspecs(&remote->passive_refspecs);
git_vector_free(&remote->passive_refspecs);
+ git__free(remote->extra_http_headers);
+
git_push_free(remote->push);
git__free(remote->url);
git__free(remote->pushurl);
diff --git a/src/remote.h b/src/remote.h
index e696997..bfb2036 100644
--- a/src/remote.h
+++ b/src/remote.h
@@ -32,6 +32,7 @@ struct git_remote {
git_remote_autotag_option_t download_tags;
int prune_refs;
int passed_refspecs;
+ git_strarray *extra_http_headers;
};
const char* git_remote__urlfordirection(struct git_remote *remote, int direction);
diff --git a/src/transports/http.c b/src/transports/http.c
index d348310..664cd80 100644
--- a/src/transports/http.c
+++ b/src/transports/http.c
@@ -974,6 +974,7 @@ static int http_action(
if ((!t->connection_data.host || !t->connection_data.port || !t->connection_data.path) &&
(ret = gitno_connection_data_from_url(&t->connection_data, url, NULL)) < 0)
return ret;
+ t->connection_data.extra_headers = t->owner->owner->extra_http_headers;
if ((ret = http_connect(t)) < 0)
return ret;