mirror of
https://github.com/octoleo/restic.git
synced 2024-12-25 20:11:06 +00:00
commit
2dd592a06c
8
changelog/unreleased/pull-3254
Normal file
8
changelog/unreleased/pull-3254
Normal file
@ -0,0 +1,8 @@
|
||||
Enhancement: Enable HTTP/2 for backend connections
|
||||
|
||||
Go's HTTP library usually automatically chooses between HTTP/1.x and HTTP/2
|
||||
depending on what the server supports. But for compatibility this mechanism
|
||||
is disabled if DialContext is used (which is the case for restic). This change
|
||||
allows restic's HTTP client to negotiate HTTP/2 if supported by the server.
|
||||
|
||||
https://github.com/restic/restic/pull/3254
|
@ -70,6 +70,7 @@ func Transport(opts TransportOptions) (http.RoundTripper, error) {
|
||||
KeepAlive: 30 * time.Second,
|
||||
DualStack: true,
|
||||
}).DialContext,
|
||||
ForceAttemptHTTP2: true,
|
||||
MaxIdleConns: 100,
|
||||
MaxIdleConnsPerHost: 100,
|
||||
IdleConnTimeout: 90 * time.Second,
|
||||
|
Loading…
Reference in New Issue
Block a user