Tim Funk wrote: > If http://host/contextpath is requested - shouldn't we be redirecting to > http://host/contextpath/ , not worrying about a null uri?
The mapper does issue the redirect, this just prevents the NPE. I considered just returning but opted (for consistency) to emulate what would happen if there was a default servlet present. Mark > > -Tim > > > ma...@apache.org wrote: >> Author: markt >> Date: Fri May 1 20:12:09 2009 >> New Revision: 770809 >> >> URL: http://svn.apache.org/viewvc?rev=770809&view=rev >> Log: >> Fix 47080: NPE in RealmBase.findSecurityConstraints when uri is null >> https://issues.apache.org/bugzilla/show_bug.cgi?id=47080 >> >> Modified: >> tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java >> >> Modified: tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java >> URL: >> http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java?rev=770809&r1=770808&r2=770809&view=diff >> >> ============================================================================== >> >> --- tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java (original) >> +++ tomcat/trunk/java/org/apache/catalina/realm/RealmBase.java Fri >> May 1 20:12:09 2009 >> @@ -471,6 +471,11 @@ >> >> // Check each defined security constraint >> String uri = request.getRequestPathMB().toString(); >> + // Bug47080 - in rare cases this may be null >> + // Mapper treats as '/' do the same to prevent NPE >> + if (uri == null) { >> + uri = "/"; >> + } >> String method = request.getMethod(); >> int i; > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org