mbox series

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

Message ID pull.69.git.gitgitgadget@gmail.com (mailing list archive)
Headers show
Series http: add support selecting http version | expand

Message

Jean-Noël Avila via GitGitGadget Nov. 7, 2018, 1:33 p.m. UTC
Normally, git doesn't need to set curl to select the HTTP version, it works
fine without HTTP2. Adding HTTP2 support is a icing on the cake.

When http.version=20 is set, git will attempt to request the server using
HTTP2. If the remote server does not support HTTP2, it is no different.
Currently bitbucket supports HTTP2 and is available for testing.

example: 

GIT_CURL_VERBOSE=1 git2 -c http.version=20 ls-remote https://bitbucket.org/aquariusjay/deeplab-public-ver2.git

Force Charlie (1):
  http: add support selecting http version

 http.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)


base-commit: 8858448bb49332d353febc078ce4a3abcc962efe
Published-As: https://github.com/gitgitgadget/git/releases/tags/pr-69%2Ffcharlie%2Fmaster-v1
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-69/fcharlie/master-v1
Pull-Request: https://github.com/gitgitgadget/git/pull/69

Comments

Daniel Stenberg Nov. 7, 2018, 1:44 p.m. UTC | #1
On Wed, 7 Nov 2018, Force.Charlie-I via GitGitGadget wrote:

> Normally, git doesn't need to set curl to select the HTTP version, it works 
> fine without HTTP2. Adding HTTP2 support is a icing on the cake.

Just a FYI:

Starting with libcurl 7.62.0 (released a week ago), it now defaults to the 
"2TLS" setting unless you tell it otherwise. With 2TLS, libcurl will attempt 
to use HTTP/2 for HTTPS URLs.
brian m. carlson Nov. 8, 2018, 1:18 a.m. UTC | #2
On Wed, Nov 07, 2018 at 02:44:51PM +0100, Daniel Stenberg wrote:
> On Wed, 7 Nov 2018, Force.Charlie-I via GitGitGadget wrote:
> 
> > Normally, git doesn't need to set curl to select the HTTP version, it
> > works fine without HTTP2. Adding HTTP2 support is a icing on the cake.
> 
> Just a FYI:
> 
> Starting with libcurl 7.62.0 (released a week ago), it now defaults to the
> "2TLS" setting unless you tell it otherwise. With 2TLS, libcurl will attempt
> to use HTTP/2 for HTTPS URLs.

With this information, I think I would rather we rely on libcurl to do
this rather than putting it in Git.  Users will automatically get the
best supported protocol instead of having to configure it manually.
Junio C Hamano Nov. 8, 2018, 3:35 a.m. UTC | #3
"brian m. carlson" <sandals@crustytoothpaste.net> writes:

> On Wed, Nov 07, 2018 at 02:44:51PM +0100, Daniel Stenberg wrote:
>> On Wed, 7 Nov 2018, Force.Charlie-I via GitGitGadget wrote:
>> 
>> > Normally, git doesn't need to set curl to select the HTTP version, it
>> > works fine without HTTP2. Adding HTTP2 support is a icing on the cake.
>> 
>> Just a FYI:
>> 
>> Starting with libcurl 7.62.0 (released a week ago), it now defaults to the
>> "2TLS" setting unless you tell it otherwise. With 2TLS, libcurl will attempt
>> to use HTTP/2 for HTTPS URLs.
>
> With this information, I think I would rather we rely on libcurl to do
> this rather than putting it in Git.  Users will automatically get the
> best supported protocol instead of having to configure it manually.

Yup.  I suspect that the mechanism _might_ turn out to be useful to
force downgrading, though.