Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Hommey <mh@glandium.org>2008-02-09 12:41:36 +0300
committerJunio C Hamano <gitster@pobox.com>2008-02-11 23:51:55 +0300
commitb26768e25685b4f575ae07a38e5180b9879bd01e (patch)
tree4589dde496ce4f21e7f34193b0d17bf315b1c820 /transport.c
parentac3593da8f224d32cd4ffbd43ee7a04c732686dc (diff)
Work around curl-gnutls not liking to be reinitialized
curl versions 7.16.3 to 7.18.0 included had a regression in which https requests following curl_global_cleanup/init sequence would fail with ASN1 parser errors with curl-gnutls. Such sequences happen in some cases such as git fetch. We work around this by removing the http_init and http_cleanup calls from get_refs_via_curl, replacing them with a transport->data initialization with the http_walker (which does http_init). While the http_walker is not currently used in get_refs_via_curl, http and walker code refactor will make it use it. Signed-off-by: Mike Hommey <mh@glandium.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'transport.c')
-rw-r--r--transport.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/transport.c b/transport.c
index babaa21398..497f853721 100644
--- a/transport.c
+++ b/transport.c
@@ -441,11 +441,12 @@ static struct ref *get_refs_via_curl(struct transport *transport)
struct ref *ref = NULL;
struct ref *last_ref = NULL;
+ if (!transport->data)
+ transport->data = get_http_walker(transport->url);
+
refs_url = xmalloc(strlen(transport->url) + 11);
sprintf(refs_url, "%s/info/refs", transport->url);
- http_init();
-
slot = get_active_slot();
slot->results = &results;
curl_easy_setopt(slot->curl, CURLOPT_FILE, &buffer);
@@ -473,8 +474,6 @@ static struct ref *get_refs_via_curl(struct transport *transport)
return NULL;
}
- http_cleanup();
-
data = buffer.buf;
start = NULL;
mid = data;