rpc: client disable compression (#3430)

This commit is contained in:
zjubfd
2019-03-20 08:18:18 +08:00
committed by Ethan Buchman
parent 7af4b5086a
commit 03085c2da2

View File

@ -74,6 +74,8 @@ func makeHTTPClient(remoteAddr string) (string, *http.Client) {
protocol, address, dialer := makeHTTPDialer(remoteAddr)
return protocol + "://" + address, &http.Client{
Transport: &http.Transport{
// Set to true to prevent GZIP-bomb DoS attacks
DisableCompression: true,
Dial: dialer,
},
}