Only clear request attribute when different
With this commit, we now make sure that the attributes are not cleared if they are same as the nested request. Issue: SPR-17304
This commit is contained in:
@@ -940,8 +940,11 @@ public abstract class RouterFunctions {
|
||||
}
|
||||
return this.routerFunction.route(nestedRequest)
|
||||
.doOnNext(match -> {
|
||||
serverRequest.attributes().clear();
|
||||
serverRequest.attributes().putAll(nestedRequest.attributes());
|
||||
if (nestedRequest != serverRequest) {
|
||||
serverRequest.attributes().clear();
|
||||
serverRequest.attributes()
|
||||
.putAll(nestedRequest.attributes());
|
||||
}
|
||||
});
|
||||
}
|
||||
).orElseGet(Mono::empty);
|
||||
|
||||
Reference in New Issue
Block a user