Mantis Bugtracker

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0004993 [Resin] minor always 03-20-12 23:01 06-13-12 16:55
Reporter rickHigh View Status public  
Assigned To ferg
Priority normal Resolution fixed Platform
Status closed   OS
Projection none   OS Version
ETA none Fixed in Version 4.0.28 Product Version
  Product Build
Summary 0004993: Session timeout issue when using CauchoRequestWrapper instead of HttpServletRequestWrapper
Description I was able to replicate this with sample Struts app sent by customer as well as one that I wrote using Servlet API only.

In the process of creating qa test that reproduces the issue in the test harness.

Steps To Reproduce
Additional Information package qa;

import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

public class LoginServlet extends HttpServlet {

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String user = request.getParameter("user");
        String pass= request.getParameter("pass");
        if (user!=null && user.equals(pass)) {
            request.getSession().setAttribute("login", 1);
        }else if (user!=null && !user.equals(pass)){
        } else {
            response.getWriter().print("login is " + request.getSession().getAttribute("login"));

package qa;


import javax.servlet.Filter;
import javax.servlet.FilterChain;
import javax.servlet.FilterConfig;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;

public class MyFilter implements Filter
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
        throws IOException, ServletException {
        chain.doFilter(new RequestWrapper((HttpServletRequest) request), response);

    public void destroy() {

    public void init(FilterConfig a) throws ServletException {

package qa;

import javax.servlet.http.HttpServletRequest;
//import javax.servlet.http.HttpServletRequestWrapper;

import com.caucho.server.http.CauchoRequestWrapper;

public class RequestWrapper extends CauchoRequestWrapper
    public RequestWrapper(HttpServletRequest request) {


The above works with extending HttpServletRequestWrapper but not with CauchoRequestWrapper.

Symtoms are that the sessionImpl does not timeout. The use reference counter keeps increasing.

<web-app xmlns=""> [^]

    <session-config use-persistent-store="false"


Attached Files

- Relationships

- Notes
03-20-12 23:56

$ svn commit -m "Added two test cases for issue 4993. One test case uses CauchoRequestWrapper and fails to timeout properly, the other test case uses HttpServletRequestWrapper and does time out properly"'s password:
Adding server/
Adding server/

- Issue History
Date Modified Username Field Change
03-20-12 23:01 rickHigh New Issue
03-20-12 23:56 rickHigh Note Added: 0005713
06-13-12 16:55 ferg Assigned To  => ferg
06-13-12 16:55 ferg Status new => closed
06-13-12 16:55 ferg Resolution open => fixed
06-13-12 16:55 ferg Fixed in Version  => 4.0.28

Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker