From: Mike Hommey <mh@glandium.org>
To: git@vger.kernel.org, gitster@pobox.com
Subject: [PATCH v4] Work around curl-gnutls not liking to be reinitialized
Date: Sat, 9 Feb 2008 10:41:36 +0100 [thread overview]
Message-ID: <1202550096-13233-1-git-send-email-mh@glandium.org> (raw)
In-Reply-To: <1202512124-28669-1-git-send-email-mh@glandium.org>
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>
---
FWIW, the previous patch lacked an initialization for pragma_header. But I
actually got a better idea ; a more long-term one.
transport.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/transport.c b/transport.c
index babaa21..497f853 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;
--
1.5.4.35.gb88c
next prev parent reply other threads:[~2008-02-09 9:42 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-04 18:25 git-fetch in 1.5.4 fails versus 1.5.3.8 Anand Kumria
2008-02-05 5:07 ` Jeff King
2008-02-05 15:01 ` Jari Aalto
2008-02-06 21:56 ` Anand Kumria
2008-02-07 4:23 ` Jeff King
2008-02-07 6:37 ` Mike Hommey
2008-02-07 10:15 ` Anand Kumria
2008-02-07 11:06 ` Jeff King
2008-02-07 12:10 ` Mike Hommey
2008-02-07 12:28 ` Jeff King
2008-02-07 22:02 ` Mike Hommey
2008-02-08 0:32 ` Jeff King
2008-02-08 7:18 ` Mike Hommey
2008-02-08 7:34 ` Mike Hommey
2008-02-08 20:08 ` [PATCH] Work around curl-gnutls not liking to be reinitialized Mike Hommey
2008-02-08 21:31 ` Mike Hommey
2008-02-08 21:46 ` Junio C Hamano
2008-02-08 21:51 ` Mike Hommey
2008-02-08 22:09 ` Mike Hommey
2008-02-08 22:22 ` [PATCH v2] " Mike Hommey
2008-02-08 22:51 ` Johannes Schindelin
2008-02-08 23:08 ` [PATCH] " Mike Hommey
2008-02-08 23:14 ` Mike Hommey
2008-02-09 9:41 ` Mike Hommey [this message]
2008-02-09 21:51 ` [PATCH v4] " Daniel Stenberg
2008-02-09 9:44 ` [PATCH v2] " Florian Weimer
2008-02-09 10:43 ` Mike Hommey
2008-02-08 21:53 ` [PATCH] " Johannes Schindelin
2008-02-08 22:01 ` Mike Hommey
2008-02-09 2:28 ` Jeff King
2008-02-07 14:23 ` git-fetch in 1.5.4 fails versus 1.5.3.8 Frank Lichtenheld
2008-02-07 18:42 ` Linus Torvalds
2008-02-07 20:14 ` Frank Lichtenheld
2008-02-07 20:54 ` Linus Torvalds
2008-02-07 21:36 ` Anand Kumria
2008-02-07 20:40 ` Jeff King
2008-02-07 21:01 ` Linus Torvalds
2008-02-07 21:47 ` Martin Langhoff
2008-02-07 21:53 ` Dmitry Potapov
2008-02-07 22:46 ` Jeff King
2008-02-07 22:40 ` Jeff King
2008-02-07 23:23 ` Dmitry Potapov
2008-02-08 2:43 ` Anand Kumria
2008-02-08 13:27 ` Dmitry Potapov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1202550096-13233-1-git-send-email-mh@glandium.org \
--to=mh@glandium.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).