Skip to content

Commit

Permalink
Only POST compresses data
Browse files Browse the repository at this point in the history
  • Loading branch information
DoubleDi committed Mar 28, 2021
1 parent eae09ef commit 24c3508
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion conn.go
Expand Up @@ -366,7 +366,7 @@ func (c *conn) buildRequest(ctx context.Context, query string, params []driver.V
req.URL.RawQuery = reqQuery.Encode()
}

if c.useGzipCompression {
if method == http.MethodPost && c.useGzipCompression {
req.Header.Set("Content-Encoding", "gzip")
}

Expand Down

0 comments on commit 24c3508

Please sign in to comment.