Skip to content

Commit 95c001c

Browse files
committed
feat(utils): disable HTTP compression in download utilities
1 parent 267d326 commit 95c001c

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

agent/updater/utils/download.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ func DownloadFile(url string, headers map[string]string, fileName string, path s
2020

2121
client := &http.Client{}
2222
client.Transport = &http.Transport{
23-
TLSClientConfig: &tls.Config{InsecureSkipVerify: skipTlsVerification},
23+
TLSClientConfig: &tls.Config{InsecureSkipVerify: skipTlsVerification},
24+
DisableCompression: true,
2425
}
2526

2627
resp, err := client.Do(req)

utmstack-collector/utils/download.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ func DownloadFile(url string, headers map[string]string, fileName string, path s
2020

2121
client := &http.Client{}
2222
client.Transport = &http.Transport{
23-
TLSClientConfig: &tls.Config{InsecureSkipVerify: skipTlsVerification},
23+
TLSClientConfig: &tls.Config{InsecureSkipVerify: skipTlsVerification},
24+
DisableCompression: true,
2425
}
2526

2627
resp, err := client.Do(req)

0 commit comments

Comments
 (0)