Skip to content

Commit

Permalink
fix detection of accepted gzip compression when multiple values are i…
Browse files Browse the repository at this point in the history
…n header
  • Loading branch information
sduchesneau committed Jan 9, 2025
1 parent c63751b commit 0d625ab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions docs/release-notes/change-log.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## Unreleased

* Fix detection of accepted gzip compression when multiple values are sent in the `Grpc-Accept-Encoding` header (ex: Python library)
* Allow setting subscription channel max capacity via `SOURCE_CHAN_SIZE` env var (default: 100)

## v1.11.3

### Server-side
Expand Down
2 changes: 1 addition & 1 deletion service/tier1.go
Original file line number Diff line number Diff line change
Expand Up @@ -726,7 +726,7 @@ func matchGZIPHeader(req *connect.Request[pbsubstreamsrpc.Request]) bool {
if compressionHeader[strings.ToLower(k)] {
for _, vv := range v {
for _, vvv := range strings.Split(vv, ",") {
if strings.ToLower(vvv) == compressionValue {
if strings.TrimSpace(strings.ToLower(vvv)) == compressionValue {
return true
}
}
Expand Down

0 comments on commit 0d625ab

Please sign in to comment.