Skip to content

Ordering of WebClient.filter(s) [SPR-15657] #20216

@spring-projects-issues

Description

@spring-projects-issues

Joe Grandja opened SPR-15657 and commented

Given this filter configuration for WebClient:

this.webClient
   .filter(filter1())
   .filter(filter2())
   .filter(filter3())
   .filter(filter4())

The expectation is that the filters would be applied in the following order: filter1, filter2, filter3, filter4. However, that is not the case, as they are applied in reverse order.

It seems a bit confusing compared to the way a Reactive stream is defined and executed in a top-down approach (the way the code reads).

Does it make sense to have the filters applied in the order they are defined - top-down approach?


Affects: 5.0 RC1

Issue Links:

0 votes, 5 watchers

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions