Code

smart-http: Really never use Expect: 100-continue
[git.git] / remote-curl.c
index 256326afb5c720bf7451e227c838701d4fd75d0c..1f41a90936e5865d94883f57887e7ce57b716f0f 100644 (file)
@@ -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);