Merge pull request #10641 from containerd/dependabot/go_modules/github.com/prometheus/client_golang-1.20.2

build(deps): bump github.com/prometheus/client_golang from 1.20.1 to 1.20.2
This commit is contained in:
Maksym Pavlenko
2024-08-27 19:48:16 +00:00
committed by GitHub
4 changed files with 8 additions and 6 deletions

View File

@@ -203,8 +203,10 @@ func HandlerForTransactional(reg prometheus.TransactionalGatherer, opts HandlerO
defer closeWriter()
rsp.Header().Set(contentEncodingHeader, encodingHeader)
// Set Content-Encoding only when data is compressed
if encodingHeader != string(Identity) {
rsp.Header().Set(contentEncodingHeader, encodingHeader)
}
enc := expfmt.NewEncoder(w, contentType)
// handleError handles the error according to opts.ErrorHandling