Skip to content

Commit 80b429b

Browse files
committed
rebase master
Signed-off-by: SungJin1212 <[email protected]>
1 parent 0d572e5 commit 80b429b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/util/push/push.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import (
1111
"github.com/prometheus/prometheus/config"
1212
"github.com/prometheus/prometheus/model/labels"
1313
writev2 "github.com/prometheus/prometheus/prompb/io/prometheus/write/v2"
14-
"github.com/prometheus/prometheus/storage/remote"
14+
"github.com/prometheus/prometheus/util/compression"
1515
"github.com/weaveworks/common/httpgrpc"
1616
"github.com/weaveworks/common/middleware"
1717

@@ -140,8 +140,8 @@ func Handler(remoteWrite2Enabled bool, maxRecvMsgSize int, sourceIPs *middleware
140140

141141
enc := r.Header.Get("Content-Encoding")
142142
if enc == "" {
143-
} else if enc != string(remote.SnappyBlockCompression) {
144-
err := fmt.Errorf("%v encoding (compression) is not accepted by this server; only %v is acceptable", enc, remote.SnappyBlockCompression)
143+
} else if enc != compression.Snappy {
144+
err := fmt.Errorf("%v encoding (compression) is not accepted by this server; only %v is acceptable", enc, compression.Snappy)
145145
level.Error(logger).Log("Error decoding remote write request", "err", err)
146146
http.Error(w, err.Error(), http.StatusUnsupportedMediaType)
147147
return

0 commit comments

Comments
 (0)