Re: [PATCH v6 1/1] http: add support selecting http version
- From
Eric Sunshine <sunshine@sunshineco.com>
- Date
- Nov 8, 2018, 18:02 UTC
- Message-ID
- <CAPig+cRpH0k-qams+_1LK9p8hYzBhD-bG3waNLeCSzYWNY41rg@mail.gmail.com>
- In-Reply-To
- <93fda67198441c159bfcf1dfa467ad76f3ecba76.1541660405.git.gitgitgadget@gmail.com>
On Thu, Nov 8, 2018 at 2:00 AM Force Charlie via GitGitGadget <gitgitgadget@gmail.com> wrote:
Show 10 quoted lines
> In order to give users the freedom to control the HTTP version,
> we need to add a setting to choose which HTTP version to use.
>
> Signed-off-by: Force Charlie <charlieio@outlook.com>
> ---
> diff --git a/http.c b/http.c
> @@ -284,6 +285,9 @@ static void process_curl_messages(void)
> static int http_options(const char *var, const char *value, void *cb)
> {
> + if (!strcmp("http.version",var)) {Style: space after comma
Show 8 quoted lines
> + return git_config_string(&curl_http_version, var, value);
> + }
> @@ -806,6 +834,16 @@ static CURL *get_curl_handle(void)
> + if (curl_http_version) {
> + long opt;
> + if (!get_curl_http_version_opt(curl_http_version, &opt)) {
> + /* Set request use http version */
> + curl_easy_setopt(result, CURLOPT_HTTP_VERSION,opt);Style: space after comma
> + } > + }