Skip to content

Commit

Permalink
Code Style
Browse files Browse the repository at this point in the history
  • Loading branch information
osazos committed Jul 15, 2021
1 parent 426bc23 commit 473d9a6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions adapters/adagio/adagio.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,8 @@ func (a *adapter) MakeRequests(request *openrtb2.BidRequest, _ *adapters.ExtraRe
// Note: Gzipping could be handled natively later: https://github.com/prebid/prebid-server/issues/1812
var bodyBuf bytes.Buffer
gz := gzip.NewWriter(&bodyBuf)
_, err = gz.Write(json)
if err == nil {
err = gz.Close()
if err == nil {
if _, err = gz.Write(json); err == nil {
if err = gz.Close(); err == nil {
json = bodyBuf.Bytes()
headers.Add("Content-Encoding", "gzip")
// /!\ Go already sets the `Accept-Encoding: gzip` header. Never add it manually, or Go won't decompress the response.
Expand Down

0 comments on commit 473d9a6

Please sign in to comment.