From: Shawn O. Pearce Date: Mon, 14 Mar 2011 18:28:17 +0000 (-0700) Subject: smart-http: Really never use Expect: 100-continue X-Git-Tag: v1.7.5-rc0~82^2 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=959dfcf42f264e8644d88b355224ff468ebae10d;p=git.git smart-http: Really never use Expect: 100-continue 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 Signed-off-by: Junio C Hamano --- diff --git a/remote-curl.c b/remote-curl.c index 256326afb..1f41a9093 100644 --- a/remote-curl.c +++ b/remote-curl.c @@ -453,12 +453,12 @@ static int post_rpc(struct rpc_state *rpc) 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);