billbarker 2002/08/21 23:04:30 Modified: src/share/org/apache/tomcat/modules/session SessionId.java Log: Fix session cookie path problem under Windows. Reported by: Tony Chao [EMAIL PROTECTED] Revision Changes Path 1.20 +18 -1 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.19 retrieving revision 1.20 diff -u -r1.19 -r1.20 --- SessionId.java 10 Nov 2001 08:57:43 -0000 1.19 +++ SessionId.java 22 Aug 2002 06:04:29 -0000 1.20 @@ -96,8 +96,10 @@ boolean noCookies=false; boolean cookiesFirst=true; boolean checkSSLSessionId=false; + boolean ignoreCase=false; public SessionId() { + ignoreCase= (File.separatorChar == '\\'); } public void setCookiesFirst( boolean b ) { @@ -112,6 +114,16 @@ this.checkSSLSessionId = checkSSLSessionId; } + /** Is the path case-insenitive. + */ + public void setIgnoreCase(boolean ic) { + ignoreCase = ic; + } + + public boolean getIgnoreCase() { + return ignoreCase; + } + /** Extract the session id from the request. * SessionInterceptor will have to be called _before_ mapper, @@ -326,7 +338,12 @@ String sessionPath = rrequest.getContext().getPath(); if(sessionPath.length() == 0) { sessionPath = "/"; - } + } else if( ignoreCase ) { + if(! rrequest.requestURI().startsWith( sessionPath )){ + sessionPath = rrequest.requestURI().toString() + .substring(0,sessionPath.length()); + } + } // // GS, piggyback the jvm route on the session id. // // if(!sessionPath.equals("/")) {
-- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>