Skip to content

[Feature request] Decompress Content-Encoding request bodies #586

@MarkusSintonen

Description

@MarkusSintonen

Thank you for the great work! 🙏

It would be awesome if Granian could decompress request bodies with Content-Encoding header set. Many of the Python web frameworks can not do it out-of-the-box (eg FastAPI only supports doing it the other way for the responses). It might also have some performance benefits if its done inside the Granian server instead of later in the Python framework side.

This feature might require additional settings to opt-in for specific decompressors (eg zstd/gzip). Also it might require adding a config for maximum decompressed payload size. So we would decompress the received body in chunks and error if the decompressed size grows too big per user configured limit.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions