Skip to content

Commit 4ec0020

Browse files
committed
fix: set http Transport DisableCompression to true
1 parent 454a1e6 commit 4ec0020

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

transport.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,15 @@ func NewTransport(dialFn func(ctx context.Context, network, addr string) (net.Co
3535
DialContext: dialFn,
3636
DialTLSContext: dialFn,
3737
ForceAttemptHTTP2: true,
38+
DisableCompression: true,
3839
},
3940
h2cTransport: &http2.Transport{
40-
AllowHTTP: true,
41-
IdleConnTimeout: time.Second * 60,
42-
PingTimeout: time.Second * 15,
43-
ReadIdleTimeout: time.Second * 20,
44-
WriteByteTimeout: time.Second * 30,
41+
AllowHTTP: true,
42+
DisableCompression: true,
43+
IdleConnTimeout: time.Second * 60,
44+
PingTimeout: time.Second * 15,
45+
ReadIdleTimeout: time.Second * 20,
46+
WriteByteTimeout: time.Second * 30,
4547
DialTLSContext: func(ctx context.Context, network, addr string, cfg *tls.Config) (net.Conn, error) {
4648
return dialFn(ctx, network, addr)
4749
},

0 commit comments

Comments
 (0)