405537 NPE in rendering JSP using SPDY and wrapped ServletRequest

This commit is contained in:
Jan Bartel 2013-04-18 14:26:18 +10:00
parent e1fa106c19
commit 2e5a233cd3
1 changed files with 6 additions and 1 deletions

View File

@ -24,6 +24,7 @@ import javax.servlet.GenericServlet;
import javax.servlet.ServletException; import javax.servlet.ServletException;
import javax.servlet.ServletRequest; import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse; import javax.servlet.ServletResponse;
import javax.servlet.http.HttpServletRequest;
import org.eclipse.jetty.server.Dispatcher; import org.eclipse.jetty.server.Dispatcher;
import org.eclipse.jetty.server.AbstractHttpConnection; import org.eclipse.jetty.server.AbstractHttpConnection;
@ -96,7 +97,11 @@ public class JspPropertyGroupServlet extends GenericServlet
@Override @Override
public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException
{ {
Request request=(req instanceof Request)?(Request)req:AbstractHttpConnection.getCurrentConnection().getRequest(); HttpServletRequest request = null;
if (req instanceof HttpServletRequest)
request = (HttpServletRequest)req;
else
throw new ServletException("Request not HttpServletRequest");
String servletPath=null; String servletPath=null;
String pathInfo=null; String pathInfo=null;