Merge branch 'dt/http-postbuffer-can-be-large'
Allow the http.postbuffer configuration variable to be set to a size that can be expressed in size_t, which can be larger than ulong on some platforms. * dt/http-postbuffer-can-be-large: http.postbuffer: allow full range of ssize_t values
This commit is contained in:
6
http.c
6
http.c
@ -19,7 +19,7 @@ long int git_curl_ipresolve;
|
||||
#endif
|
||||
int active_requests;
|
||||
int http_is_verbose;
|
||||
size_t http_post_buffer = 16 * LARGE_PACKET_MAX;
|
||||
ssize_t http_post_buffer = 16 * LARGE_PACKET_MAX;
|
||||
|
||||
#if LIBCURL_VERSION_NUM >= 0x070a06
|
||||
#define LIBCURL_CAN_HANDLE_AUTH_ANY
|
||||
@ -331,7 +331,9 @@ static int http_options(const char *var, const char *value, void *cb)
|
||||
}
|
||||
|
||||
if (!strcmp("http.postbuffer", var)) {
|
||||
http_post_buffer = git_config_int(var, value);
|
||||
http_post_buffer = git_config_ssize_t(var, value);
|
||||
if (http_post_buffer < 0)
|
||||
warning(_("negative value for http.postbuffer; defaulting to %d"), LARGE_PACKET_MAX);
|
||||
if (http_post_buffer < LARGE_PACKET_MAX)
|
||||
http_post_buffer = LARGE_PACKET_MAX;
|
||||
return 0;
|
||||
|
Reference in New Issue
Block a user