diff options
| author | Junio C Hamano <gitster@pobox.com> | 2008-03-02 15:11:26 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2008-03-02 15:11:26 -0800 |
| commit | 7ab9f8f8b12853d4cb0e45031bf2ee9a0517ad22 (patch) | |
| tree | e49451e1e0e6c60c424c8c6334b9dacc6b9577f7 /http.c | |
| parent | Merge branch 'cb/http-test' (diff) | |
| parent | Set proxy override with http_init() (diff) | |
| download | git-7ab9f8f8b12853d4cb0e45031bf2ee9a0517ad22.tar.gz git-7ab9f8f8b12853d4cb0e45031bf2ee9a0517ad22.zip | |
Merge branch 'mh/maint-http-proxy-fix'
* mh/maint-http-proxy-fix:
Set proxy override with http_init()
Diffstat (limited to 'http.c')
| -rw-r--r-- | http.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -218,13 +218,16 @@ static CURL* get_curl_handle(void) return result; } -void http_init(void) +void http_init(struct remote *remote) { char *low_speed_limit; char *low_speed_time; curl_global_init(CURL_GLOBAL_ALL); + if (remote && remote->http_proxy) + curl_http_proxy = xstrdup(remote->http_proxy); + pragma_header = curl_slist_append(pragma_header, "Pragma: no-cache"); #ifdef USE_CURL_MULTI @@ -314,6 +317,11 @@ void http_cleanup(void) curl_slist_free_all(pragma_header); pragma_header = NULL; + + if (curl_http_proxy) { + free(curl_http_proxy); + curl_http_proxy = NULL; + } } struct active_request_slot *get_active_slot(void) |
