summaryrefslogtreecommitdiff
path: root/http-push.c
diff options
context:
space:
mode:
authorMartin Storsjö <martin@martin.st>2009-11-23 11:03:28 +0800
committerJunio C Hamano <gitster@pobox.com>2009-11-22 22:56:54 -0800
commitd21f9794ceff7d89fd2fc44a3e5ff106d5dbd141 (patch)
treed9de5a2b5895d54c538b8fd851169854d6104254 /http-push.c
parent7b357240f047bfbeae377b8c5327944337124a0f (diff)
downloadgit-d21f9794ceff7d89fd2fc44a3e5ff106d5dbd141.tar.gz
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 <martin@martin.st> Signed-off-by: Tay Ray Chuan <rctay89@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http-push.c')
-rw-r--r--http-push.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/http-push.c b/http-push.c
index 0e040f8c9a..432b20f2d9 100644
--- a/http-push.c
+++ b/http-push.c
@@ -408,10 +408,10 @@ static void start_put(struct transfer_request *request)
curl_easy_setopt(slot->curl, CURLOPT_IOCTLDATA, &request->buffer);
#endif
curl_easy_setopt(slot->curl, CURLOPT_WRITEFUNCTION, fwrite_null);
+ curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 0);
curl_easy_setopt(slot->curl, CURLOPT_CUSTOMREQUEST, DAV_PUT);
curl_easy_setopt(slot->curl, CURLOPT_UPLOAD, 1);
curl_easy_setopt(slot->curl, CURLOPT_PUT, 1);
- curl_easy_setopt(slot->curl, CURLOPT_NOBODY, 0);
curl_easy_setopt(slot->curl, CURLOPT_URL, request->url);
if (start_active_slot(slot)) {