[jboss-jira] [JBoss JIRA] Commented: (JBWEB-188) After removing the ROOT.war, NPE occurs and 200 OK is returned when browsing to a non existing path

Masafumi Miura (JIRA) jira-events at lists.jboss.org
Tue Oct 26 10:53:55 EDT 2010


    [ https://jira.jboss.org/browse/JBWEB-188?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12559351#action_12559351 ] 

Masafumi Miura commented on JBWEB-188:
--------------------------------------

Please backport the following NULL checks (line 489 - 498) to JBOSSWEB_2_0_0_GA_CP branch from 2.1.x branch.

http://anonsvn.jboss.org/repos/jbossweb/branches/2.1.x/java/org/apache/catalina/connector/CoyoteAdapter.java

377	    protected boolean postParseRequest(org.apache.coyote.Request req, 
378	                                       Request request,
379	                                       org.apache.coyote.Response res, 
380	                                       Response response)
381	            throws Exception {
 ...(snip)...
489	        if (request.getMappingData().host == null) {
490	            res.setStatus(400);
491	            res.setMessage("Host not mapped");
492	            return false;
493	        }
494	        if (request.getMappingData().context == null) {
495	            res.setStatus(404);
496	            res.setMessage("Context not mapped");
497	            return false;
498	        }
 ...(snip)...
546	        // Parse session Id
547	        parseSessionCookiesId(req, request);
548	
549	        return true;
550	    }

 ...(snip)...

599	    protected void parseSessionCookiesId(org.apache.coyote.Request req, Request request) {
600	
601	        // If session tracking via cookies has been disabled for the current
602	        // context, don't go looking for a session ID in a cookie as a cookie
603	        // from a parent context with a session ID may be present which would
604	        // overwrite the valid session ID encoded in the URL
605	        if (!((Context)request.getMappingData().context).getCookies())
606	            return;
607	
 ...(snip)...

> After removing the ROOT.war, NPE occurs and 200 OK is returned when browsing to a non existing path
> ---------------------------------------------------------------------------------------------------
>
>                 Key: JBWEB-188
>                 URL: https://jira.jboss.org/browse/JBWEB-188
>             Project: JBoss Web
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Tomcat
>         Environment: JBossWeb-2.0.0.GA_CP14 which come with EAP 4.2 CP09 and EAP 4.3 CP08
>            Reporter: Masafumi Miura
>            Assignee: Remy Maucherat
>
> After removing the ROOT.war, the server behaves as if it exists (200 OK is returned and page is loaded empty) and the console shows the following NPE when browsing to a non existing path.
> ERROR [CoyoteAdapter] An exception or error occurred in the container during the request processing
> java.lang.NullPointerException
> 	at org.apache.catalina.connector.CoyoteAdapter.parseSessionCookiesId(CoyoteAdapter.java:507)
> 	at org.apache.catalina.connector.CoyoteAdapter.postParseRequest(CoyoteAdapter.java:449)
> 	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:239)
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
> 	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
> 	at java.lang.Thread.run(Thread.java:636) 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list