Repository navigation
HTTP/2 protocol support - #3793
Merged
Merged
Conversation
PastelMobileSuit
force-pushed
the
http2
branch
from
August 26, 2019 23:25
e5c4248 to
1d7a096
Compare
bk2204
approved these changes
Aug 27, 2019
| srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { | ||
| atomic.AddUint32(&calledSrv, 1) | ||
| assert.Equal(t, "GET", r.Method) | ||
| assert.Equal(t, "HTTP/1.1", r.Proto) |
Member
There was a problem hiding this comment.
Thanks for testing that things still work with HTTP 1.1 here as well.
| tr.TLSClientConfig.RootCAs = getRootCAsForHost(c, host) | ||
| } | ||
|
|
||
| http2.ConfigureTransport(tr) |
Member
There was a problem hiding this comment.
I love it when the fix is a single line.
Contributor
Author
There was a problem hiding this comment.
It's really nice! To be honest digging through trying to figure out how to get the httptest server to support the HTTP/2 protocol took significantly longer than actually adding HTTP/2 support to the client
Vendor the `golang.org/x/net` dependency. This will be used in a future commit to add HTTP/2 transport support. Note that due to the way go modules work, the `golang.org/x/sys` dependency was updated as well when running `make vendor`.
This commit configures the internal client we use for all HTTP requests in `git-lfs` to use the HTTP/2 protocol if supported by the server.
PastelMobileSuit
force-pushed
the
http2
branch
from
August 27, 2019 17:24
1d7a096 to
a0a2815
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds support for the HTTP/2 protocol to the internal client LFS uses for HTTP requests. With this change, the client will automatically use HTTP/2 if the server supports it, and otherwise will fall back to using HTTP/1.1.
/cc @andreynpetrov