X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;ds=sidebyside;f=http.c;h=a1ea3db499eebc2deabf1a64e43b063cbe63ad2a;hb=f5114a40c0d0276ce6ff215a3dc51eb19da5b420;hp=b2ae8de16db3abe2cad27249ae767f421aa6bb24;hpb=347231f7352a4caac8bd95924c20afde4455c89c;p=git.git diff --git a/http.c b/http.c index b2ae8de16..a1ea3db49 100644 --- a/http.c +++ b/http.c @@ -41,6 +41,7 @@ static long curl_low_speed_limit = -1; static long curl_low_speed_time = -1; static int curl_ftp_no_epsv; static const char *curl_http_proxy; +static const char *curl_cookie_file; static char *user_name, *user_pass; static const char *user_agent; @@ -191,6 +192,9 @@ static int http_options(const char *var, const char *value, void *cb) if (!strcmp("http.proxy", var)) return git_config_string(&curl_http_proxy, var, value); + if (!strcmp("http.cookiefile", var)) + return git_config_string(&curl_cookie_file, var, value); + if (!strcmp("http.postbuffer", var)) { http_post_buffer = git_config_int(var, value); if (http_post_buffer < LARGE_PACKET_MAX) @@ -531,6 +535,7 @@ struct active_request_slot *get_active_slot(void) slot->finished = NULL; slot->callback_data = NULL; slot->callback_func = NULL; + curl_easy_setopt(slot->curl, CURLOPT_COOKIEFILE, curl_cookie_file); curl_easy_setopt(slot->curl, CURLOPT_HTTPHEADER, pragma_header); curl_easy_setopt(slot->curl, CURLOPT_ERRORBUFFER, curl_errorstr); curl_easy_setopt(slot->curl, CURLOPT_CUSTOMREQUEST, NULL);