Skip to content

Add support for server-side request decompression #11827

@raphw

Description

@raphw

Currently, Spring Boot seems to ingore the Content-Encoding header when dispatching a HTTP request received from a client. This manifests in unmarshalling error deep inside the Spring stack unless one adds an interceptor to transform any HttpServletRequest. Adding such an interceptor is cumbersome as the servlet API requires the implementation of a rather heavy wrapper object.

I argue that Spring Boot should be capable of detecting the header before disaptching to a controller. Ideally, Spring Boot should make an attempt to wrap the input stream before it is unmarshalled to apply unzipping. At a minimum, Spring Boot should detect that the header is present and present a better error message.

The decompression attempt could also be controlled by the server.compression.enabled property.

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