Skip to content

AbstractCachingViewResolver - caching redirect views leads to memory leak [SPR-10065] #14698

Closed
@spring-projects-issues

Description

@spring-projects-issues

Michał Jaśtak opened SPR-10065 and commented

When user uses URL prefixed with "redirect:" as the method invocation result in Controller, it is cached as the whole (with provided parameters) in AbstractCachingViewResolver. Because the parameters for redirect may vary for the same URL used in redirect, and HashMap based cache is used, that leads to memory leak.

PS: this problem exists also in 2.5.x, I didn't checked how far in the Spring history it reaches


Affects: 3.1.3

Reference URL: http://vard-lokkur.blogspot.com/2012/12/springs-web-mvc-redirect-to-memory-leak.html

Issue Links:

Referenced from: commits f19bc57, 9deaefe

Backported to: 3.1.4

1 votes, 7 watchers

Metadata

Metadata

Assignees

Labels

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

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions