{"thread":{"id":"26728","subject":"[PATCH] smart-http: Really never use Expect: 100-continue","startedAt":"2011-03-14T18:28:17Z","lastAt":"2011-03-14T19:34:24Z","messageCount":2,"participants":["Shawn O. Pearce","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"163323","messageId":"1300127297-8025-1-git-send-email-spearce@spearce.org","threadId":"26728","inReplyTo":null,"subject":"[PATCH] smart-http: Really never use Expect: 100-continue","fromName":"Shawn O. Pearce","fromEmail":"spearce@spearce.org","sentAt":"2011-03-14T18:28:17Z","receivedAt":"2011-03-14T18:28:17Z","isPatch":true,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"libcurl may choose to try and use Expect: 100-continue for\nany type of POST, not just a Transfer: chunked-encoding type.\nForce it to disable this feature, as not all proxy servers support\n100-continue and leaving it enabled can cause 1 second stalls during\nthe negotiation phase of fetch-pack/upload-pack.\n\nIn (\"206b099d26 smart-http: Don't use Expect: 100-Continue\") we\ntried to disable this for only large POST bodies, but it should be\ndisabled for every POST body.\n\nSigned-off-by: Shawn O. Pearce <spearce@spearce.org>\n---\n\n This should be applied onto the tip of sp/maint-smart-http-sans-100-continue.\n\n remote-curl.c |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/remote-curl.c b/remote-curl.c\nindex 256326a..1f41a90 100644\n--- a/remote-curl.c\n+++ b/remote-curl.c\n@@ -453,12 +453,12 @@ static int post_rpc(struct rpc_state *rpc)\n \n \theaders = curl_slist_append(headers, rpc->hdr_content_type);\n \theaders = curl_slist_append(headers, rpc->hdr_accept);\n+\theaders = curl_slist_append(headers, \"Expect:\");\n \n \tif (large_request) {\n \t\t/* The request body is large and the size cannot be predicted.\n \t\t * We must use chunked encoding to send it.\n \t\t */\n-\t\theaders = curl_slist_append(headers, \"Expect:\");\n \t\theaders = curl_slist_append(headers, \"Transfer-Encoding: chunked\");\n \t\trpc->initial_buffer = 1;\n \t\tcurl_easy_setopt(slot->curl, CURLOPT_READFUNCTION, rpc_out);\n-- \n1.7.4.1.408.gb6b16.dirty\n"},{"id":"163335","messageId":"7vtyf5cx8f.fsf@alter.siamese.dyndns.org","threadId":"26728","inReplyTo":"1300127297-8025-1-git-send-email-spearce@spearce.org","subject":"Re: [PATCH] smart-http: Really never use Expect: 100-continue","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2011-03-14T19:34:24Z","receivedAt":"2011-03-14T19:34:24Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks; will queue.\n"}]}