-
Notifications
You must be signed in to change notification settings - Fork 38.8k
Closed
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement
Milestone
Description
Sébastien Deleuze opened SPR-14979 and commented
Currently it seems to me there is no obvious way to use WebFilter with the Functional Web Framework without doing a cast like in this code sample. It is worth to notice that we expose only a HttpHandler return type in RouterFunctions.toHttpHandler() while the type actually returned in the implementation is a HttpWebHandlerAdapter that implements both HttpHandler and WebHandler. It could be nice to be able to get a WebHandler in order to make it easier to deal with WebFilter.
Not sure what is the best way to do that:
- Add a
RouterFunctions.toWebHandler()method? - Return
HttpWebHandlerAdapterinRouterFunctions.toWebHandler()? - Introduce a new interfaces that implements both
HttpHandlerandWebHandlerto avoid exposingHttpWebHandlerAdapterwith is an implementation detail?
This question of using WebFilter versus HttpHandler is maybe something worth to discuss with Rossen Stoyanchev.
No further details from SPR-14979
Metadata
Metadata
Assignees
Labels
in: webIssues in web modules (web, webmvc, webflux, websocket)Issues in web modules (web, webmvc, webflux, websocket)type: enhancementA general enhancementA general enhancement