When content-length is defined, the encoder is a LengthDelimitedEncoder, and even a 0-length write will trigger an exception when the content length has been reached. The current code allows 0-length writes, and we should protect ourselves against that. Note: this problem only affects 5.8.0.CR1, but was only witnessed while working on
HSEARCH-2849 In Progress . It is possible that the bug never actually happens in 5.8.0.CR1 because
HSEARCH-2849 In Progress makes it content-length definition rarer.
|