tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 6115] - URL encoding of session id doesn't work correctly with anchors/fragments
Date Wed, 30 Jan 2002 01:01:54 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6115>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6115

URL encoding of session id doesn't work correctly with anchors/fragments

dlr@finemaltcoding.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From dlr@finemaltcoding.com  2002-01-30 01:01 -------
This was fixed by Larry in rev 1.43 of HttpResponseBase:

revision 1.43 
date: 2002/01/05 22:39:12;  author: larryi;  state: Exp;  lines: +11 -4 
Port Bill Barker's fix to place ";jsessionid" in the correct location in 
the presence of an anchor in the URL. 

@@ -724,14 +724,21 @@ 
  
         String path = url; 
         String query = ""; 
+        String anchor = ""; 
         int question = url.indexOf('?'); 
         if (question >= 0) { 
             path = url.substring(0, question); 
             query = url.substring(question); 
         } 
+        int pound = path.indexOf('#'); 
+        if (pound >= 0) { 
+            anchor = path.substring(pound); 
+            path = path.substring(0, pound); 
+        } 
         StringBuffer sb = new StringBuffer(path); 
         sb.append(";jsessionid="); 
         sb.append(sessionId); 
+        sb.append(anchor); 
         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