Skip to content

RestClient does not support transparent content decompression #24349

@jimczi

Description

@jimczi

Currently it is possible to set a default header in the RestClient that indicates that all response should be compressed:

"Accept-Encoding": "gzip,deflate"

Though the underlying async client that the RestClient uses does not handle compressed content and instead will return a compressed entity. This means that users of RestClient must check the response entity and wrap it with a decompressor if they want to be able to handle compressed responses.
Similarly it is not possible to use compression in reindex from remote since the response entities are not decompressed by the rest client directly.
I don't know if the RestClient should do that automatically but we should be able to use compression in reindex even if this means adding an explicit decompressor in reindex.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions