Skip to content

Commit

Permalink
fixup! Add support for decompression of HTTP responses
Browse files Browse the repository at this point in the history
  • Loading branch information
mem committed Mar 31, 2021
1 parent 0dc0058 commit 6e1d94e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions prober/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ func ProbeHTTP(ctx context.Context, target string, module config.Module, registr
if httpConfig.Compression != "" {
dec, err := getDecompressionReader(httpConfig.Compression, resp.Body)
if err != nil {
level.Info(logger).Log("msg", "Failed to get decompressor for HTTP response body", "err", err.Error())
level.Info(logger).Log("msg", "Failed to get decompressor for HTTP response body", "err", err)
success = false
} else if dec != nil {
// Since we are replacing the original resp.Body with the decoder, we need to make sure
Expand All @@ -488,7 +488,7 @@ func ProbeHTTP(ctx context.Context, target string, module config.Module, registr
if err != nil {
// At this point we cannot really do anything with this error, but log
// it in case it contains useful information as to what's the problem.
level.Info(logger).Log("msg", "Error while closing response from server", "error", err.Error())
level.Info(logger).Log("msg", "Error while closing response from server", "err", err)
}
}(resp.Body)

Expand Down

0 comments on commit 6e1d94e

Please sign in to comment.