AbstractRequestLoggingFilter with startAsync: unwrap request to find ContentCachingRequestWrapper [SPR-13764] #18338
Labels
in: web
Issues in web modules (web, webmvc, webflux, websocket)
status: backported
An issue that has been backported to maintenance branches
type: enhancement
A general enhancement
Milestone
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
The text was updated successfully, but these errors were encountered: