summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7b35724)
raw | patch | inline | side by side (parent: 7b35724)
author | Martin Storsjö <martin@martin.st> | |
Mon, 23 Nov 2009 03:03:28 +0000 (11:03 +0800) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 23 Nov 2009 06:56:54 +0000 (22:56 -0800) |
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>
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>
http-push.c | patch | blob | history | |
remote-curl.c | patch | blob | history |
diff --git a/http-push.c b/http-push.c
index 0e040f8c9a5f3ba2fa0c3858580292dd84a834e9..432b20f2d9a750263d930683e770413ac5328935 100644 (file)
--- a/http-push.c
+++ b/http-push.c
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)) {
diff --git a/remote-curl.c b/remote-curl.c
index 4f28c222f2064b27c41bbcfbb425c6a221b46a58..69eaf58dfe2be1a73b2c94ee9e33a678f1fb4f3e 100644 (file)
--- a/remote-curl.c
+++ b/remote-curl.c
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, "");