You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by bu...@apache.org on 2002/01/30 02:01:54 UTC
DO NOT REPLY [Bug 6115] -
URL encoding of session id doesn't work correctly with anchors/fragments
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: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>