Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

To fix GH-2304 SaveSessionGatewayFilterFactory didn't work correctly #2997

Merged
merged 4 commits into from
Mar 8, 2024

Conversation

imzhoukunqiang
Copy link
Contributor

@imzhoukunqiang imzhoukunqiang commented Jul 3, 2023

Hi Team, I'm upgrading from Zuul to Spring Gateway for my project. But I found a bug in SaveSessionGatewayFilterFactory .

Fixes GH-2304

public Mono<Void> filter(ServerWebExchange exchange, GatewayFilterChain chain) {
    return exchange.getSession().map(WebSession::save).then(chain.filter(exchange));
}

The return type of exchange.getSession().map(WebSession::save) is Mono<Mono<Void>>
image

I think this is a bug ,because the return value WebSession::save will never be consumed.

@pivotal-cla
Copy link

@imzhoukunqiang Please sign the Contributor License Agreement!

Click here to manually synchronize the status of this Pull Request.

See the FAQ for frequently asked questions.

@pivotal-cla
Copy link

@imzhoukunqiang Thank you for signing the Contributor License Agreement!

@spencergibb spencergibb added this to the 4.1.2 milestone Mar 8, 2024
@spencergibb spencergibb merged commit 7968b0d into spring-cloud:main Mar 8, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
No open projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Spring Gateway SaveSession Issue with Redis
4 participants