Skip to content

Commit

Permalink
export request compression const
Browse files Browse the repository at this point in the history
  • Loading branch information
Tianyi Wang committed Dec 6, 2023
1 parent 690fcaa commit 1b78114
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions private/requestcompression/request_compression.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"io"
)

const maxRequestMinCompressSizeBytes = 10485760
const MaxRequestMinCompressSizeBytes = 10485760

// Enumeration values for supported compress Algorithms.
const (
Expand Down Expand Up @@ -58,7 +58,7 @@ func (m requestCompression) HandleSerialize(
return next.HandleSerialize(ctx, in)
}
// still need to check requestMinCompressSizeBytes in case it is out of range after service client config
if m.requestMinCompressSizeBytes < 0 || m.requestMinCompressSizeBytes > maxRequestMinCompressSizeBytes {
if m.requestMinCompressSizeBytes < 0 || m.requestMinCompressSizeBytes > MaxRequestMinCompressSizeBytes {
return out, metadata, fmt.Errorf("invalid range for min request compression size bytes %d, must be within 0 and 10485760 inclusively", m.requestMinCompressSizeBytes)
}

Expand Down

0 comments on commit 1b78114

Please sign in to comment.