From 71b1bcfac514635d9f18c8eda03ca8c3bf1a56c9 Mon Sep 17 00:00:00 2001 From: Caleb Doxsey Date: Wed, 12 Oct 2022 14:46:06 -0600 Subject: [PATCH] config: default to http2 (#3660) * config: default to http2 * fix test --- config/codec_type_test.go | 5 ----- config/envoyconfig/listeners_test.go | 1 - config/options.go | 3 --- 3 files changed, 9 deletions(-) diff --git a/config/codec_type_test.go b/config/codec_type_test.go index 4bbd27c44..86fe037ff 100644 --- a/config/codec_type_test.go +++ b/config/codec_type_test.go @@ -8,10 +8,5 @@ import ( func TestOptions_GetCodecType(t *testing.T) { options := NewDefaultOptions() - assert.Equal(t, CodecTypeHTTP1, options.GetCodecType()) - options.Services = "proxy" - assert.Equal(t, CodecTypeAuto, options.GetCodecType()) - options.Services = "all" - options.CodecType = CodecTypeAuto assert.Equal(t, CodecTypeAuto, options.GetCodecType()) } diff --git a/config/envoyconfig/listeners_test.go b/config/envoyconfig/listeners_test.go index 5fb75b6cf..4160e6b07 100644 --- a/config/envoyconfig/listeners_test.go +++ b/config/envoyconfig/listeners_test.go @@ -139,7 +139,6 @@ func Test_buildMainHTTPConnectionManagerFilter(t *testing.T) { } }], "alwaysSetRequestIdInResponse": true, - "codecType": "HTTP1", "commonHttpProtocolOptions": { "idleTimeout": "300s" }, diff --git a/config/options.go b/config/options.go index b9c4f5141..c235f3200 100644 --- a/config/options.go +++ b/config/options.go @@ -1049,9 +1049,6 @@ func (o *Options) GetQPS() float64 { // GetCodecType gets a codec type. func (o *Options) GetCodecType() CodecType { if o.CodecType == CodecTypeUnset { - if IsAll(o.Services) { - return CodecTypeHTTP1 - } return CodecTypeAuto } return o.CodecType