tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From billbar...@apache.org
Subject cvs commit: jakarta-tomcat/src/facade22/org/apache/tomcat/facade HttpServletResponseFacade.java
Date Fri, 16 Nov 2001 04:10:35 GMT
billbarker    01/11/15 20:10:35

  Modified:    src/facade22/org/apache/tomcat/facade
                        HttpServletResponseFacade.java
  Log:
  Fix URL rewriting when the url has an anchor.
  
  In order to be functional, the "jsessionid=" must be part of the "file" component of the
URL.  This just makes certain that it is not part of the anchor.
  
  Revision  Changes    Path
  1.23      +11 -3     jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpServletResponseFacade.java
  
  Index: HttpServletResponseFacade.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpServletResponseFacade.java,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- HttpServletResponseFacade.java	2001/11/14 02:57:08	1.22
  +++ HttpServletResponseFacade.java	2001/11/16 04:10:35	1.23
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpServletResponseFacade.java,v
1.22 2001/11/14 02:57:08 larryi Exp $
  - * $Revision: 1.22 $
  - * $Date: 2001/11/14 02:57:08 $
  + * $Header: /home/cvs/jakarta-tomcat/src/facade22/org/apache/tomcat/facade/HttpServletResponseFacade.java,v
1.23 2001/11/16 04:10:35 billbarker Exp $
  + * $Revision: 1.23 $
  + * $Date: 2001/11/16 04:10:35 $
    *
    * ====================================================================
    *
  @@ -440,9 +440,17 @@
   	    path = url.substring(0, question);
   	    query = url.substring(question);
   	}
  +	String anchor = null;
  +	int hashP = path.indexOf("#");
  +	if(hashP >= 0) {
  +	    anchor = path.substring(hashP);
  +	    path = path.substring(0,hashP);
  +	}
   	StringBuffer sb = new StringBuffer(path);
   	sb.append(";jsessionid=");
   	sb.append(sessionId);
  +	if(anchor != null) 
  +	    sb.append(anchor);
   	if (query != null)
   	    sb.append(query);
   	return (sb.toString());
  
  
  

--
To unsubscribe, e-mail:   <mailto:tomcat-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-dev-help@jakarta.apache.org>


Mime
View raw message