Tracker Bug created.
In ClientScope.java, there is a method:
Code:
public void storeCustomVarsToCookie() {
String cookieValue = "";
Iterator it = this.keySet().iterator();
while (it.hasNext()) {
String varName = (String) it.next();
String varValue = this.getClientValue(varName).toString();
if (!isBuiltInVarible(varName)) {
cookieValue += "#"
+ SmithString.URLEncodedFormat(varName,
ApplicationServices.BYTE_CHARSET)
+ "="
+ SmithString.URLEncodedFormat(varValue,
ApplicationServices.BYTE_CHARSET);
addPermanentCookieToResponse(COOKIE_CFCLIENT, cookieValue);
}
}
}
This results in the following result headers, after you have gone through a few pages on the app:
Code:
Date: Wed, 05 Mar 2008 22:30:50 GMT
Server: Apache/2.2.6 (Unix) DAV/2 mod_jk/1.2.26 PHP/4.4.8
Set-Cookie: CFGLOBALS="#HitCount=19#LastVisit={ts '2008-03-05 14:30:51'}#TimeCreated={ts '2008-02-11 18:40:39'}#"; Expires=Fri, 26-Feb-2038 22:30:51 GMT; Path=/
CFCLIENT_=#view216318=1; Expires=Fri, 26-Feb-2038 22:30:51 GMT; Path=/
CFCLIENT_=#view216318=1#view214555=1; Expires=Fri, 26-Feb-2038 22:30:51 GMT; Path=/
CFCLIENT_=#view216318=1#view214555=1#album16019=1; Expires=Fri, 26-Feb-2038 22:30:51 GMT; Path=/
CFCLIENT_=#view216318=1#view214555=1#album16019=1#album15854=1; Expires=Fri, 26-Feb-2038 22:30:51 GMT; Path=/
Content-Language: en_US
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html;charset=UTF-8
200 OK
As you can see, each CFCLIENT_ line in the response headers is simply the previous one with the value from the iterator inserted at the end. I believe the problem may be that the code calls addPermanentCookieToResponse() from INSIDE the iterator, rather than using the iterator to build up the cookie's contents and then calling addPermanentCookieToResponse() once after the iterator is done.