summaryrefslogtreecommitdiff
path: root/include/git2
diff options
context:
space:
mode:
authorMatt Burke <spraints@gmail.com>2015-09-08 13:53:41 -0400
committerMatt Burke <spraints@gmail.com>2015-09-08 14:02:33 -0400
commit4f2b6093a64ead32f51a886186496821e003cee5 (patch)
tree8d31557e46d2492c7ec02314ebabc6cee4b2873b /include/git2
parent9da32a625564064908b61530318a1366ffff8217 (diff)
downloadlibgit2-4f2b6093a64ead32f51a886186496821e003cee5.tar.gz
Tell the git_transport about the custom_headers
Diffstat (limited to 'include/git2')
-rw-r--r--include/git2/remote.h3
-rw-r--r--include/git2/sys/transport.h5
2 files changed, 7 insertions, 1 deletions
diff --git a/include/git2/remote.h b/include/git2/remote.h
index a39e5a415..9237ca255 100644
--- a/include/git2/remote.h
+++ b/include/git2/remote.h
@@ -241,9 +241,10 @@ GIT_EXTERN(const git_refspec *)git_remote_get_refspec(const git_remote *remote,
* @param direction GIT_DIRECTION_FETCH if you want to fetch or
* GIT_DIRECTION_PUSH if you want to push
* @param callbacks the callbacks to use for this connection
+ * @param custom_headers extra HTTP headers to use in this connection
* @return 0 or an error code
*/
-GIT_EXTERN(int) git_remote_connect(git_remote *remote, git_direction direction, const git_remote_callbacks *callbacks);
+GIT_EXTERN(int) git_remote_connect(git_remote *remote, git_direction direction, const git_remote_callbacks *callbacks, const git_strarray *custom_headers);
/**
* Get the remote repository's reference advertisement list
diff --git a/include/git2/sys/transport.h b/include/git2/sys/transport.h
index 4a75b0832..ca8617f3f 100644
--- a/include/git2/sys/transport.h
+++ b/include/git2/sys/transport.h
@@ -40,6 +40,11 @@ struct git_transport {
git_transport_certificate_check_cb certificate_check_cb,
void *payload);
+ /* Set custom headers for HTTP requests */
+ int (*set_custom_headers)(
+ git_transport *transport,
+ const git_strarray *custom_headers);
+
/* Connect the transport to the remote repository, using the given
* direction. */
int (*connect)(