mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-29 18:36:30 +02:00
parent
245d1b0de4
commit
71b1bcfac5
3 changed files with 0 additions and 9 deletions
|
@ -8,10 +8,5 @@ import (
|
||||||
|
|
||||||
func TestOptions_GetCodecType(t *testing.T) {
|
func TestOptions_GetCodecType(t *testing.T) {
|
||||||
options := NewDefaultOptions()
|
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())
|
assert.Equal(t, CodecTypeAuto, options.GetCodecType())
|
||||||
}
|
}
|
||||||
|
|
|
@ -139,7 +139,6 @@ func Test_buildMainHTTPConnectionManagerFilter(t *testing.T) {
|
||||||
}
|
}
|
||||||
}],
|
}],
|
||||||
"alwaysSetRequestIdInResponse": true,
|
"alwaysSetRequestIdInResponse": true,
|
||||||
"codecType": "HTTP1",
|
|
||||||
"commonHttpProtocolOptions": {
|
"commonHttpProtocolOptions": {
|
||||||
"idleTimeout": "300s"
|
"idleTimeout": "300s"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1049,9 +1049,6 @@ func (o *Options) GetQPS() float64 {
|
||||||
// GetCodecType gets a codec type.
|
// GetCodecType gets a codec type.
|
||||||
func (o *Options) GetCodecType() CodecType {
|
func (o *Options) GetCodecType() CodecType {
|
||||||
if o.CodecType == CodecTypeUnset {
|
if o.CodecType == CodecTypeUnset {
|
||||||
if IsAll(o.Services) {
|
|
||||||
return CodecTypeHTTP1
|
|
||||||
}
|
|
||||||
return CodecTypeAuto
|
return CodecTypeAuto
|
||||||
}
|
}
|
||||||
return o.CodecType
|
return o.CodecType
|
||||||
|
|
Loading…
Add table
Reference in a new issue