Skip to content

Question : Why aren't HttpAttributes copied in ServerRequest? #2175

@thibaudledent

Description

@thibaudledent

Hi,

I noticed that HttpAttributes are not copied in ServerRequest.

In a Spring Boot application, I would like to pass a userId inside a WebFilter using HttpAttributes, and then later retrieve this value in LogbookWebFilter via an AttributeExtractor in order to include it in the logs. However, in my AttributeExtractor, I see that all HttpAttributes are empty.

This looks similar to what was fixed in PR #1805 for a different class (ClientRequest.java), but it seems that ServerRequest is missing the same behavior.

Is there a particular reason for not copying HttpAttributes in ServerRequest?

If not, I'd be happy to create a PR to address this.

Thanks!

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