WicketFilter.getLastModified creates a RequestCycle but does not clean it up
----------------------------------------------------------------------------
Key: WICKET-2566
URL: https://issues.apache.org/jira/browse/WICKET-2566
Project: Wicket
Issue Type: Bug
Components: wicket
Affects Versions: 1.4.1
Environment: not relevant
Reporter: Peter Dotchev
I noticed that WicketFilter.getLastModified creates a RequestCycle but does not
detach it, so onEndRequest is not called.
This makes it hard to clean up resources allocated for a specific request.
I found the following sequence in WicketFilter:
doFilter
getLastModified
webApplication.newRequestCycle
resource.getResourceStream
// requestCycle.detach - this is commented
requestCycle.unset // this does not call onEndRequest
doGet
webApplication.newRequestCycle // second RequestCycle is created
cycle.request() // this calls again getResourceStream but also
RequestCycle.detach
It turns out two RequestCycle's are created but only the second one is
detached. Also Resource.getResourceStream is called twice. This is all
for one request.
Is it possible that doFilter creates just one RequestCycke and calls
getResourceStream just once?
http://www.mail-archive.com/[email protected]/msg44538.html
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.