larryi 01/07/20 10:42:47
Modified: src/share/org/apache/tomcat/modules/session SessionId.java
Log:
req.unparsedURI may be unset. Fix NPE.
Revision Changes Path
1.12 +7 -5
jakarta-tomcat/src/share/org/apache/tomcat/modules/session/SessionId.java
Index: SessionId.java
===================================================================
RCS file:
/home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/modules/session/SessionId.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- SessionId.java 2001/07/18 21:06:38 1.11
+++ SessionId.java 2001/07/20 17:42:47 1.12
@@ -139,11 +139,13 @@
// rewrite URL, do I need to do anything more?
request.requestURI().setString(uri.substring(0, foundAt));
- // remove from unparsedURI too, if not already
- foundAt = request.unparsedURI().indexOf(sig);
- if (foundAt!=-1) {
- uri=request.unparsedURI().toString();
- request.unparsedURI().setString(uri.substring(0, foundAt));
+ // remove from unparsedURI too, if necessary
+ if( !request.unparsedURI().isNull() ) {
+ foundAt = request.unparsedURI().indexOf(sig);
+ if (foundAt!=-1) {
+ uri=request.unparsedURI().toString();
+ request.unparsedURI().setString(uri.substring(0, foundAt));
+ }
}
// No validate now - we just note that this is what the user