Skip to content

AbstractRequestLoggingFilter with startAsync: unwrap request to find ContentCachingRequestWrapper [SPR-13764] #18338

Closed
@spring-projects-issues

Description

@spring-projects-issues

Andreas Voellmy opened SPR-13764 and commented

In a subclass of AbstractRequestLoggingFilter in beforeRequest(), the request parameter is an instance of ContentCachingRequestWrapper, which allows createMessage(), or subclass code to access the cached content. However, in an asynchronous method return, the request passed to afterRequest() is not an instance of ContentCachingRequestWrapper, so createMessage() doesn't include cached contents. The request object does wrap a ContentCachingRequestWrapper, but the immediate request object is not an instance of ContentCachingRequestWrapper. It seems like it would better if the request argument to afterRequest was also an instance of ContentCachingRequestWrapper.


Affects: 4.1 GA, 4.2 GA

Backported to: 4.1.9

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchestype: enhancementA general enhancement

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions