Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

internal/envoy: Update GZip to valid wellknown name #2926

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 7 additions & 5 deletions internal/envoy/listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ import (
type HTTPVersionType = http.HttpConnectionManager_CodecType

const (
HTTPVersionAuto HTTPVersionType = http.HttpConnectionManager_AUTO
HTTPVersion1 HTTPVersionType = http.HttpConnectionManager_HTTP1
HTTPVersion2 HTTPVersionType = http.HttpConnectionManager_HTTP2
HTTPVersion3 HTTPVersionType = http.HttpConnectionManager_HTTP3
HTTPVersionAuto HTTPVersionType = http.HttpConnectionManager_AUTO
HTTPVersion1 HTTPVersionType = http.HttpConnectionManager_HTTP1
HTTPVersion2 HTTPVersionType = http.HttpConnectionManager_HTTP2
HTTPVersion3 HTTPVersionType = http.HttpConnectionManager_HTTP3
gzipHTTPFilterName = "envoy.filters.http.compressor"
)

// TLSInspector returns a new TLS inspector listener filter.
Expand Down Expand Up @@ -204,7 +205,8 @@ func (b *httpConnectionManagerBuilder) ConnectionShutdownGracePeriod(timeout tim
func (b *httpConnectionManagerBuilder) DefaultFilters() *httpConnectionManagerBuilder {
b.filters = append(b.filters,
&http.HttpFilter{
Name: wellknown.Gzip,
// TODO(#2479) Update once go-control-plane constant is merged (https://github.com/envoyproxy/go-control-plane/pull/354).
Name: gzipHTTPFilterName,
},
&http.HttpFilter{
Name: wellknown.GRPCWeb,
Expand Down
14 changes: 7 additions & 7 deletions internal/envoy/listener_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ func TestHTTPConnectionManager(t *testing.T) {
},
},
HttpFilters: []*http.HttpFilter{{
Name: wellknown.Gzip,
Name: gzipHTTPFilterName,
}, {
Name: wellknown.GRPCWeb,
}, {
Expand Down Expand Up @@ -388,7 +388,7 @@ func TestHTTPConnectionManager(t *testing.T) {
},
},
HttpFilters: []*http.HttpFilter{{
Name: wellknown.Gzip,
Name: gzipHTTPFilterName,
}, {
Name: wellknown.GRPCWeb,
}, {
Expand Down Expand Up @@ -439,7 +439,7 @@ func TestHTTPConnectionManager(t *testing.T) {
},
},
HttpFilters: []*http.HttpFilter{{
Name: wellknown.Gzip,
Name: gzipHTTPFilterName,
}, {
Name: wellknown.GRPCWeb,
}, {
Expand Down Expand Up @@ -491,7 +491,7 @@ func TestHTTPConnectionManager(t *testing.T) {
},
},
HttpFilters: []*http.HttpFilter{{
Name: wellknown.Gzip,
Name: gzipHTTPFilterName,
}, {
Name: wellknown.GRPCWeb,
}, {
Expand Down Expand Up @@ -542,7 +542,7 @@ func TestHTTPConnectionManager(t *testing.T) {
},
},
HttpFilters: []*http.HttpFilter{{
Name: wellknown.Gzip,
Name: gzipHTTPFilterName,
}, {
Name: wellknown.GRPCWeb,
}, {
Expand Down Expand Up @@ -594,7 +594,7 @@ func TestHTTPConnectionManager(t *testing.T) {
},
},
HttpFilters: []*http.HttpFilter{{
Name: wellknown.Gzip,
Name: gzipHTTPFilterName,
}, {
Name: wellknown.GRPCWeb,
}, {
Expand Down Expand Up @@ -644,7 +644,7 @@ func TestHTTPConnectionManager(t *testing.T) {
},
},
HttpFilters: []*http.HttpFilter{{
Name: wellknown.Gzip,
Name: gzipHTTPFilterName,
}, {
Name: wellknown.GRPCWeb,
}, {
Expand Down