IllegalStateException when sending an Elasticsearch request with a content-length

Description

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. It is possible that the bug never actually happens in 5.8.0.CR1 because makes it content-length definition rarer.

Activity

Show:
Fixed

Details

Assignee

Reporter

Components

Fix versions

Affects versions

Priority

Created August 17, 2017 at 12:30 PM
Updated September 13, 2017 at 10:15 PM
Resolved August 22, 2017 at 3:59 PM