Improve or remove the currently useless content-length hinting when computing Elasticsearch request hash

Description

When we compute a hash for an Elasticsearch request (currently only used in the AWS request signing), we take advantage of this opportunity to compute the content length, and set it on the entity.
But, as we don't want to advertise different content-length to different callers, we also take care to freeze the content length as soon as it's been requested through getContentLength, making later content length computation useless.

As it happens, the request interceptor org.apache.http.protocol.RequestContent is always executed before the AWS signing interceptor, effectively making the content length computation useless when doing AWS signing.
We should either find a way to perform this content length computation sooner, or remove it altogether, because as it is, it's useless.

Activity

Show:
Fixed

Details

Assignee

Reporter

Components

Fix versions

Priority

Created August 16, 2017 at 8:50 AM
Updated September 13, 2017 at 10:15 PM
Resolved September 11, 2017 at 4:54 PM