Ticket #76 (assigned defect)

Opened 4 months ago

Last modified 4 months ago

resume() in JSJaCConnection.js not working in Opera

Reported by: matweew Owned by: zeank
Priority: normal Milestone: jsjac-1.3.2
Component: jsjac Version: svn trunk
Severity: normal Keywords:
Cc:

Description

patch (added escape() and unescape()):

svn diff JSJaCConnection.js 18:03:32 Index: JSJaCConnection.js =================================================================== --- JSJaCConnection.js (revision 515) +++ JSJaCConnection.js (working copy) @@ -374,7 +374,7 @@

*/

JSJaCConnection.prototype.resume = function() {

try {

- var json = JSJaCCookie.read(this._cookie_prefix+'JSJaC_State').getValue(); + var json = unescape(JSJaCCookie.read(this._cookie_prefix+'JSJaC_State').getValue());

this.oDbg.log('read cookie: '+json,2); JSJaCCookie.read(this._cookie_prefix+'JSJaC_State').erase();

@@ -551,7 +551,7 @@

var data = this.suspendToData();

try {

- var c = new JSJaCCookie(this._cookie_prefix+'JSJaC_State', JSJaCJSON.toString(data)); + var c = new JSJaCCookie(this._cookie_prefix+'JSJaC_State', escape(JSJaCJSON.toString(data)));

this.oDbg.log("writing cookie: "+c.getValue()+"\n"+

"(length:"+c.getValue().length+")",2);

c.write();

Change History

Changed 4 months ago by matweew

  • version changed from 1.3 to svn trunk

Changed 4 months ago by zeank

jsjac already does escape and unescape values of cookies. this is handled within JSJaCCookie.js, so I don't see why it should escape things twice.

maybe it could help to use encodeURIComponent and decodeURIComponent instead of escape and unescape. Have a look at _escape and _unescape at JSJaCCookie.js and tell me if it solves your problem

Changed 4 months ago by zeank

  • status changed from new to assigned
Note: See TracTickets for help on using tickets.