summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 206b099)
raw | patch | inline | side by side (parent: 206b099)
author | Shawn O. Pearce <spearce@spearce.org> | |
Mon, 14 Mar 2011 18:28:17 +0000 (11:28 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 14 Mar 2011 18:58:51 +0000 (11:58 -0700) |
libcurl may choose to try and use Expect: 100-continue for
any type of POST, not just a Transfer: chunked-encoding type.
Force it to disable this feature, as not all proxy servers support
100-continue and leaving it enabled can cause 1 second stalls during
the negotiation phase of fetch-pack/upload-pack.
In ("206b099d26 smart-http: Don't use Expect: 100-Continue") we
tried to disable this for only large POST bodies, but it should be
disabled for every POST body.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
any type of POST, not just a Transfer: chunked-encoding type.
Force it to disable this feature, as not all proxy servers support
100-continue and leaving it enabled can cause 1 second stalls during
the negotiation phase of fetch-pack/upload-pack.
In ("206b099d26 smart-http: Don't use Expect: 100-Continue") we
tried to disable this for only large POST bodies, but it should be
disabled for every POST body.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
remote-curl.c | patch | blob | history |
diff --git a/remote-curl.c b/remote-curl.c
index 256326afb5c720bf7451e227c838701d4fd75d0c..1f41a90936e5865d94883f57887e7ce57b716f0f 100644 (file)
--- a/remote-curl.c
+++ b/remote-curl.c
headers = curl_slist_append(headers, rpc->hdr_content_type);
headers = curl_slist_append(headers, rpc->hdr_accept);
+ headers = curl_slist_append(headers, "Expect:");
if (large_request) {
/* The request body is large and the size cannot be predicted.
* We must use chunked encoding to send it.
*/
- headers = curl_slist_append(headers, "Expect:");
headers = curl_slist_append(headers, "Transfer-Encoding: chunked");
rpc->initial_buffer = 1;
curl_easy_setopt(slot->curl, CURLOPT_READFUNCTION, rpc_out);