From: Jonathan Nieder <jrnieder@gmail.com>
To: "brian m. carlson" <sandals@crustytoothpaste.net>
Cc: git@vger.kernel.org, "Nguyễn Thái Ngọc Duy" <pclouds@gmail.com>,
"Junio C Hamano" <gitster@pobox.com>, "Jeff King" <peff@peff.net>,
"Shawn Pearce" <spearce@spearce.org>
Subject: Re: [PATCH v2 1/2] http: add option to enable 100 Continue responses
Date: Fri, 11 Oct 2013 16:43:07 -0700 [thread overview]
Message-ID: <20131011234307.GU9464@google.com> (raw)
In-Reply-To: <1381530945-90590-2-git-send-email-sandals@crustytoothpaste.net>
brian m. carlson wrote:
> When using GSS-Negotiate authentication with libcurl, the authentication
> provided will change every time, and so the probe that git uses to determine if
> authentication is needed is not sufficient to guarantee that data can be sent.
> If the data fits entirely in http.postBuffer bytes, the data can be rewound and
> resent if authentication fails; otherwise, a 100 Continue must be requested in
> this case.
>
> By default, curl will send an Expect: 100-continue if a certain amount of data
> is to be uploaded, but when using chunked data this is never triggered. Add an
> option http.continue, which defaults to disabled, to control whether this header
> is sent. The addition of an option is necessary because some proxies break
> badly if sent this header.
"By default" means "when allowed to make its own choice", right? (i.e.,
the behavior git never gave libcurl a chance to try :))
Makes sense.
[...]
> --- a/http.c
> +++ b/http.c
> @@ -11,6 +11,7 @@
> int active_requests;
> int http_is_verbose;
> size_t http_post_buffer = 16 * LARGE_PACKET_MAX;
> +int http_use_100_continue = 0;
Style: git tends to omit the '= 0' implicit for globals, since they are
already 0 by default.
[...]
> --- a/remote-curl.c
> +++ b/remote-curl.c
> @@ -470,7 +470,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:");
> +
> + /* Force it either on or off, since curl will try to decide based on how
> + * much data is to be uploaded and we want consistency.
> + */
Style:
/*
* Multi-line comments in git have the starting and ending comment
* delimiters on their own lines, like this.
*/
Will make the fixups mentioned above, squash with documentation, and
apply. Thanks.
next prev parent reply other threads:[~2013-10-11 23:43 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-11 22:35 [PATCH v2 0/2] HTTP GSS-Negotiate improvements brian m. carlson
2013-10-11 22:35 ` [PATCH v2 1/2] http: add option to enable 100 Continue responses brian m. carlson
2013-10-11 23:43 ` Jonathan Nieder [this message]
2013-10-12 0:03 ` brian m. carlson
2013-10-11 22:35 ` [PATCH v2 2/2] Update documentation for http.continue option brian m. carlson
2013-10-11 23:50 ` Jonathan Nieder
2013-10-12 0:26 ` brian m. carlson
2013-10-18 22:15 ` brian m. carlson
2013-10-22 23:00 ` Junio C Hamano
2013-10-22 23:32 ` Jonathan Nieder
2013-10-23 1:34 ` Jonathan Nieder
2013-10-23 3:00 ` brian m. carlson
2013-10-23 3:21 ` Shawn Pearce
2013-10-23 22:56 ` brian m. carlson
2013-10-25 7:17 ` Jeff King
2013-10-25 20:56 ` brian m. carlson
2013-10-23 15:47 ` Junio C Hamano
2013-10-23 22:53 ` brian m. carlson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20131011234307.GU9464@google.com \
--to=jrnieder@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=pclouds@gmail.com \
--cc=peff@peff.net \
--cc=sandals@crustytoothpaste.net \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).