Update httpgetter.go

Signed-off-by: NexusNull <p.wellershaus@googlemail.com>
Signed-off-by: Patric Wellershaus <p.wellershaus@googlemail.com>
pull/11597/head
NexusNull 2 years ago committed by Patric Wellershaus
parent 0ba3d99138
commit 47d9800643
No known key found for this signature in database
GPG Key ID: DBE4145336BF8CA8

@ -52,7 +52,9 @@ func (g *HTTPGetter) get(href string) (*bytes.Buffer, error) {
if err != nil {
return nil, err
}
req.Header.Set("Accept", "application/gzip,application/octet-stream")
req.Header.Set("User-Agent", version.GetUserAgent())
if g.opts.userAgent != "" {
req.Header.Set("User-Agent", g.opts.userAgent)
@ -116,8 +118,6 @@ func (g *HTTPGetter) httpClient() (*http.Client, error) {
}, nil
}
req.Header.Set("Accept", "application/gzip,application/octet-stream")
g.once.Do(func() {
g.transport = &http.Transport{
DisableCompression: true,

Loading…
Cancel
Save