git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v6 0/1] http: add support selecting http version

From
FGForce.Charlie-I via GitGitGadget <gitgitgadget@gmail.com>
Date
Nov 8, 2018, 07:00 UTC
Message-ID
<pull.69.v6.git.gitgitgadget@gmail.com>
In-Reply-To
<pull.69.v5.git.gitgitgadget@gmail.com>

Usually we don't need to set libcurl to choose which version of the HTTP protocol to use to communicate with a server. But different versions of libcurl, the default value is not the same.

CURL >= 7.62.0: CURL_HTTP_VERSION_2TLS CURL < 7.62: CURL_HTTP_VERSION_1_1

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.

This patch support force enable HTTP/2 or HTTP/1.1. 
example: 
GIT_CURL_VERBOSE=1 git2 -c http.version=HTTP/2 ls-remote https://bitbucket.org/aquariusjay/deeplab-public-ver2.git
Force Charlie (1):
  http: add support selecting http version
 Documentation/config.txt |  9 +++++++++
 http.c                   | 38 ++++++++++++++++++++++++++++++++++++++
 2 files changed, 47 insertions(+)
base-commit: 8858448bb49332d353febc078ce4a3abcc962efe
Published-As: https://github.com/gitgitgadget/git/releases/tags/pr-69%2Ffcharlie%2Fmaster-v6
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-69/fcharlie/master-v6
Pull-Request: https://github.com/gitgitgadget/git/pull/69
Range-diff vs v5:
 1:  cdd93048ba ! 1:  93fda67198 http: add support selecting http version
     @@ -2,8 +2,38 @@
      
          http: add support selecting http version
      
     +    Usually we don't need to set libcurl to choose which version of the
     +    HTTP protocol to use to communicate with a server.
     +    But different versions of libcurl, the default value is not the same.
     +
     +    CURL >= 7.62.0: CURL_HTTP_VERSION_2TLS
     +    CURL < 7.62: CURL_HTTP_VERSION_1_1
     +
     +    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/Documentation/config.txt b/Documentation/config.txt
     +--- a/Documentation/config.txt
     ++++ b/Documentation/config.txt
     +@@
     + 	If set, store cookies received during requests to the file specified by
     + 	http.cookieFile. Has no effect if http.cookieFile is unset.
     + 
     ++http.version::
     ++	Use the specified HTTP protocol version when communicating with a server.
     ++	If you want to force the default. The available and default version depend
     ++	on libcurl. Actually the possible values of
     ++	this option are:
     ++
     ++	- HTTP/2
     ++	- HTTP/1.1
     ++
     + http.sslVersion::
     + 	The SSL version to use when negotiating an SSL connection, if you
     + 	want to force the default.  The available and default version
     +
      diff --git a/http.c b/http.c
      --- a/http.c
      +++ b/http.c
-- 
gitgitgadget
Previous: Force Charlie via GitGitGadgetNext: Force Charlie via GitGitGadget
Message 23 of 33 in “http: add support selecting http version”
  1. 0/1 http: add support selecting http versionForce.Charlie-I via GitGitGadget, Nov 7, 2018
  2. 1/1 http: add support selecting http versionForce Charlie via GitGitGadget, Nov 7, 2018
  3. Junio C HamanoNov 8, 2018
  4. Daniel StenbergNov 7, 2018
  5. brian m. carlsonNov 8, 2018
  6. Junio C HamanoNov 8, 2018
  7. 0/3 http: add support selecting http versionForce.Charlie-I via GitGitGadget, Nov 8, 2018
  8. 1/3 http: add support selecting http versionForce Charlie via GitGitGadget, Nov 8, 2018
  9. 2/3 support force use http 1.1Force Charlie via GitGitGadget, Nov 8, 2018
  10. 3/3 fix curl version to support CURL_HTTP_VERSION_2TLSForce Charlie via GitGitGadget, Nov 8, 2018
  11. 0/4 http: add support selecting http versionForce.Charlie-I via GitGitGadget, Nov 8, 2018
  12. 1/4 http: add support selecting http versionForce Charlie via GitGitGadget, Nov 8, 2018
  13. 2/4 support force use http 1.1Force Charlie via GitGitGadget, Nov 8, 2018
  14. 3/4 fix curl version to support CURL_HTTP_VERSION_2TLSForce Charlie via GitGitGadget, Nov 8, 2018
  15. 4/4 http: change http.version value typeForce Charlie via GitGitGadget, Nov 8, 2018
  16. 0/4 http: add support selecting http versionForce.Charlie-I via GitGitGadget, Nov 8, 2018
  17. 3/4 fix curl version to support CURL_HTTP_VERSION_2TLSForce Charlie via GitGitGadget, Nov 8, 2018
  18. 2/4 support force use http 1.1Force Charlie via GitGitGadget, Nov 8, 2018
  19. 4/4 http: change http.version value typeForce Charlie via GitGitGadget, Nov 8, 2018
  20. 1/4 http: add support selecting http versionForce Charlie via GitGitGadget, Nov 8, 2018
  21. 0/1 http: add support selecting http versionForce.Charlie-I via GitGitGadget, Nov 8, 2018
  22. 1/1 http: add support selecting http versionForce Charlie via GitGitGadget, Nov 8, 2018
  23. 0/1 http: add support selecting http versionForce.Charlie-I via GitGitGadget, Nov 8, 2018
  24. 1/1 http: add support selecting http versionForce Charlie via GitGitGadget, Nov 8, 2018
  25. Eric SunshineNov 8, 2018
  26. Junio C HamanoNov 9, 2018
  27. Junio C HamanoNov 9, 2018
  28. 0/1 http: add support selecting http versionForce.Charlie-I via GitGitGadget, Nov 8, 2018
  29. 1/1 http: add support selecting http versionForce Charlie via GitGitGadget, Nov 8, 2018
  30. Junio C HamanoNov 9, 2018
  31. 0/1 http: add support selecting http versionForce.Charlie-I via GitGitGadget, Nov 9, 2018
  32. 1/1 http: add support selecting http versionForce Charlie via GitGitGadget, Nov 9, 2018
  33. Junio C HamanoNov 8, 2018

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.