mirror of
https://github.com/idanoo/autobrr
synced 2025-07-22 16:29:12 +00:00
feat(http): set ResponseHeaderTimeout (#1777)
fix(http): implement ResponseHeaderTimeout
This commit is contained in:
parent
8f2398a627
commit
a003f68f92
1 changed files with 14 additions and 12 deletions
|
@ -18,12 +18,13 @@ var Transport = &http.Transport{
|
|||
Timeout: 30 * time.Second, // default transport value
|
||||
KeepAlive: 30 * time.Second, // default transport value
|
||||
}).DialContext,
|
||||
ForceAttemptHTTP2: true, // default is true; since HTTP/2 multiplexes a single TCP connection. we'd want to use HTTP/1, which would use multiple TCP connections.
|
||||
MaxIdleConns: 100, // default transport value
|
||||
MaxIdleConnsPerHost: 10, // default is 2, so we want to increase the number to use establish more connections.
|
||||
IdleConnTimeout: 90 * time.Second, // default transport value
|
||||
TLSHandshakeTimeout: 10 * time.Second, // default transport value
|
||||
ExpectContinueTimeout: 1 * time.Second, // default transport value
|
||||
ForceAttemptHTTP2: true, // default is true; since HTTP/2 multiplexes a single TCP connection.
|
||||
MaxIdleConns: 100, // default transport value
|
||||
MaxIdleConnsPerHost: 10, // default is 2, so we want to increase the number to use establish more connections.
|
||||
IdleConnTimeout: 90 * time.Second, // default transport value
|
||||
ResponseHeaderTimeout: 120 * time.Second, // servers can respond slowly - this should fix some portion of releases getting stuck as pending.
|
||||
TLSHandshakeTimeout: 10 * time.Second, // default transport value
|
||||
ExpectContinueTimeout: 1 * time.Second, // default transport value
|
||||
ReadBufferSize: 65536,
|
||||
WriteBufferSize: 65536,
|
||||
TLSClientConfig: &tls.Config{
|
||||
|
@ -37,12 +38,13 @@ var TransportTLSInsecure = &http.Transport{
|
|||
Timeout: 30 * time.Second, // default transport value
|
||||
KeepAlive: 30 * time.Second, // default transport value
|
||||
}).DialContext,
|
||||
ForceAttemptHTTP2: true, // default is true; since HTTP/2 multiplexes a single TCP connection. we'd want to use HTTP/1, which would use multiple TCP connections.
|
||||
MaxIdleConns: 100, // default transport value
|
||||
MaxIdleConnsPerHost: 10, // default is 2, so we want to increase the number to use establish more connections.
|
||||
IdleConnTimeout: 90 * time.Second, // default transport value
|
||||
TLSHandshakeTimeout: 10 * time.Second, // default transport value
|
||||
ExpectContinueTimeout: 1 * time.Second, // default transport value
|
||||
ForceAttemptHTTP2: true, // default is true; since HTTP/2 multiplexes a single TCP connection.
|
||||
MaxIdleConns: 100, // default transport value
|
||||
MaxIdleConnsPerHost: 10, // default is 2, so we want to increase the number to use establish more connections.
|
||||
IdleConnTimeout: 90 * time.Second, // default transport value
|
||||
ResponseHeaderTimeout: 120 * time.Second, // servers can respond slowly - this should fix some portion of releases getting stuck as pending.
|
||||
TLSHandshakeTimeout: 10 * time.Second, // default transport value
|
||||
ExpectContinueTimeout: 1 * time.Second, // default transport value
|
||||
ReadBufferSize: 65536,
|
||||
WriteBufferSize: 65536,
|
||||
TLSClientConfig: &tls.Config{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue