diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2019-10-25 12:22:10 +0100 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2020-01-24 10:16:36 -0600 |
commit | 7372573b5f1113b8522e2588fac1c529ddcedb0a (patch) | |
tree | 640bffeb289ef588579ae5274a459f0e487f76b9 /include/git2/common.h | |
parent | 6c21c989a3b8cba20ad8cbe806937071a1923832 (diff) | |
download | libgit2-7372573b5f1113b8522e2588fac1c529ddcedb0a.tar.gz |
httpclient: support expect/continue
Allow users to opt-in to expect/continue handling when sending a POST
and we're authenticated with a "connection-based" authentication
mechanism like NTLM or Negotiate.
If the response is a 100, return to the caller (to allow them to post
their body). If the response is *not* a 100, buffer the response for
the caller.
HTTP expect/continue is generally safe, but some legacy servers
have not implemented it correctly. Require it to be opt-in.
Diffstat (limited to 'include/git2/common.h')
-rw-r--r-- | include/git2/common.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/git2/common.h b/include/git2/common.h index 438198295..947e40845 100644 --- a/include/git2/common.h +++ b/include/git2/common.h @@ -203,7 +203,8 @@ typedef enum { GIT_OPT_ENABLE_UNSAVED_INDEX_SAFETY, GIT_OPT_GET_PACK_MAX_OBJECTS, GIT_OPT_SET_PACK_MAX_OBJECTS, - GIT_OPT_DISABLE_PACK_KEEP_FILE_CHECKS + GIT_OPT_DISABLE_PACK_KEEP_FILE_CHECKS, + GIT_OPT_ENABLE_HTTP_EXPECT_CONTINUE } git_libgit2_opt_t; /** @@ -397,6 +398,11 @@ typedef enum { * > This will cause .keep file existence checks to be skipped when * > accessing packfiles, which can help performance with remote filesystems. * + * opts(GIT_OPT_ENABLE_HTTP_EXPECT_CONTINUE, int enabled) + * > When connecting to a server using NTLM or Negotiate + * > authentication, use expect/continue when POSTing data. + * > This option is not available on Windows. + * * @param option Option key * @param ... value to set the option * @return 0 on success, <0 on failure |