From d21f9794ceff7d89fd2fc44a3e5ff106d5dbd141 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Mon, 23 Nov 2009 11:03:28 +0800 Subject: Disable CURLOPT_NOBODY before enabling CURLOPT_PUT and CURLOPT_POST This works around a bug in curl versions up to 7.19.4, where disabling the CURLOPT_NOBODY option sets the internal state incorrectly considering that CURLOPT_PUT was enabled earlier. The bug is discussed at http://curl.haxx.se/bug/view.cgi?id=2727981 and is corrected in the latest version of curl in CVS. This bug usually has no impact on git, but may surface if using multi-pass authentication methods. Signed-off-by: Martin Storsjo Signed-off-by: Tay Ray Chuan Signed-off-by: Junio C Hamano --- remote-curl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'remote-curl.c') diff --git a/remote-curl.c b/remote-curl.c index 4f28c222f..69eaf58df 100644 --- a/remote-curl.c +++ b/remote-curl.c @@ -356,8 +356,8 @@ static int post_rpc(struct rpc_state *rpc) slot = get_active_slot(); slot->results = &results; - curl_easy_setopt(slot->curl, CURLOPT_POST, 1); curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 0); + curl_easy_setopt(slot->curl, CURLOPT_POST, 1); curl_easy_setopt(slot->curl, CURLOPT_URL, rpc->service_url); curl_easy_setopt(slot->curl, CURLOPT_ENCODING, ""); -- cgit v1.2.1