mirror of
https://github.com/libgit2/libgit2.git
synced 2026-06-22 06:26:26 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user