SplitHTTP: Replace responseOkPadding with xPaddingBytes (#3643)

This commit is contained in:
mmmray 2024-08-10 23:47:42 +02:00 committed by GitHub
parent f650d87083
commit a3b306aaa4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 119 additions and 106 deletions

View file

@ -233,7 +233,7 @@ type SplitHTTPConfig struct {
ScMaxEachPostBytes *Int32Range `json:"scMaxEachPostBytes"`
ScMinPostsIntervalMs *Int32Range `json:"scMinPostsIntervalMs"`
NoSSEHeader bool `json:"noSSEHeader"`
ResponseOkPadding *Int32Range `json:"responseOkPadding"`
XPaddingBytes *Int32Range `json:"xPaddingBytes"`
}
func splithttpNewRandRangeConfig(input *Int32Range) *splithttp.RandRangeConfig {
@ -265,7 +265,7 @@ func (c *SplitHTTPConfig) Build() (proto.Message, error) {
ScMaxEachPostBytes: splithttpNewRandRangeConfig(c.ScMaxEachPostBytes),
ScMinPostsIntervalMs: splithttpNewRandRangeConfig(c.ScMinPostsIntervalMs),
NoSSEHeader: c.NoSSEHeader,
ResponseOkPadding: splithttpNewRandRangeConfig(c.ResponseOkPadding),
XPaddingBytes: splithttpNewRandRangeConfig(c.XPaddingBytes),
}
return config, nil
}