diff options
| author | Junio C Hamano <gitster@pobox.com> | 2011-12-28 11:32:37 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2011-12-28 11:32:37 -0800 |
| commit | f1c12e1b4af2eec4eefff9350b74601b36f51d85 (patch) | |
| tree | 726933f3fdae6bcec99c28a66fbe5a1cef7243cc /http.c | |
| parent | Merge branch 'jk/maint-mv' into maint (diff) | |
| parent | http-push: enable "proactive auth" (diff) | |
| download | git-f1c12e1b4af2eec4eefff9350b74601b36f51d85.tar.gz git-f1c12e1b4af2eec4eefff9350b74601b36f51d85.zip | |
Merge branch 'jk/maint-push-over-dav' into maint
* jk/maint-push-over-dav:
http-push: enable "proactive auth"
t5540: test DAV push with authentication
Diffstat (limited to 'http.c')
| -rw-r--r-- | http.c | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -42,6 +42,7 @@ static int curl_ftp_no_epsv; static const char *curl_http_proxy; static const char *curl_cookie_file; static char *user_name, *user_pass, *description; +static int http_proactive_auth; static const char *user_agent; #if LIBCURL_VERSION_NUM >= 0x071700 @@ -276,6 +277,9 @@ static CURL *get_curl_handle(void) curl_easy_setopt(result, CURLOPT_HTTPAUTH, CURLAUTH_ANY); #endif + if (http_proactive_auth) + init_curl_http_auth(result); + if (ssl_cert != NULL) curl_easy_setopt(result, CURLOPT_SSLCERT, ssl_cert); if (has_cert_password()) @@ -364,7 +368,7 @@ static void set_from_env(const char **var, const char *envname) *var = val; } -void http_init(struct remote *remote, const char *url) +void http_init(struct remote *remote, const char *url, int proactive_auth) { char *low_speed_limit; char *low_speed_time; @@ -375,6 +379,8 @@ void http_init(struct remote *remote, const char *url) curl_global_init(CURL_GLOBAL_ALL); + http_proactive_auth = proactive_auth; + if (remote && remote->http_proxy) curl_http_proxy = xstrdup(remote->http_proxy); |
