faux switch
git-svn-id: svn+ssh://dev.eclipse.org/svnroot/rt/org.eclipse.jetty/jetty/trunk@37 7e9141cc-0065-0410-87d8-b60c137991c4
This commit is contained in:
parent
45fae7c64c
commit
d6f2a290d3
|
@ -13,19 +13,18 @@ import javax.servlet.ServletResponse;
|
|||
|
||||
public class ContinuationFilter implements Filter
|
||||
{
|
||||
final boolean _jetty=true;
|
||||
boolean _faux;
|
||||
ServletContext _context;
|
||||
|
||||
public void init(FilterConfig filterConfig) throws ServletException
|
||||
{
|
||||
_context = filterConfig.getServletContext();
|
||||
_faux=!"org.eclipse.jetty.servlet".equals(filterConfig.getClass().getPackage().getName());
|
||||
}
|
||||
|
||||
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException
|
||||
{
|
||||
if (_jetty)
|
||||
chain.doFilter(request,response);
|
||||
else
|
||||
if (_faux)
|
||||
{
|
||||
final FauxContinuation fc = new FauxContinuation();
|
||||
request.setAttribute(Continuation.ATTRIBUTE,fc);
|
||||
|
@ -51,6 +50,8 @@ public class ContinuationFilter implements Filter
|
|||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
chain.doFilter(request,response);
|
||||
}
|
||||
|
||||
public void destroy()
|
||||
|
|
Loading…
Reference in New Issue