Skip to content

org.springframework.http.HttpRequest backwards compatibility #34205

@andrewtaylor

Description

@andrewtaylor

We recently tried to upgrade our application to Spring Boot 3.4, but encountered an incompatibility with a third party library and the org.springframework.http.HttpRequest interface (from spring-web). It seems in 6.2 the getAttributes method was added, which has broken this third party library we use: https://github.com/mkopylec/charon-spring-boot-starter.

While there is an existing task with that third party library to fix the issue: mkopylec/charon-spring-boot-starter#150, might the solution to be to make getAttributes() a default method to maintain backwards compatibility?

Just a general observation, but was the HttpRequest interface not trying to encapsulate an HTTP request and not a Servlet API request? The current class comment seems to suggest it represents an "HTTP request message" and unless I'm mistaken, attributes are Servlet specific.

Metadata

Metadata

Assignees

No one assigned

    Labels

    for: external-projectNeeds a fix in external projectin: webIssues in web modules (web, webmvc, webflux, websocket)status: declinedA suggestion or change that we don't feel we should currently apply

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions