Uploaded image for project: 'Hibernate Search'
  1. HSEARCH-2849

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

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.8.0.CR1
    • Fix Version/s: 5.8.0.Final
    • Component/s: backend-elasticsearch
    • Labels:
      None

      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.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                yrodiere Yoann Rodière
                Reporter:
                yrodiere Yoann Rodière
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: