PDA

View Full Version : [UNKNOWN][3.??] Bug? Encoded cookie value is sent with request.



imnilesh
23 Aug 2009, 10:36 PM
Hi,
I am using Ext.state.CookieProvider for tracking some of the client data.
I am setting the data using:


var myCookieProvider = new Ext.state.CookieProvider({name:"clientData"});

//setting the value
var value = '8_u_';
myCookieProvider.set('test', value);

When I check the post data or check it on server side, I see that the cookie value has been escaped:

'8_u_' is sent as 's%3A8_u_' (extra 's%3A' added)
'8$u$' is sent as 's%3A8%24u%24'. (extra 's%3A' added, $ escaped)

After more debugging, observed that:
Ext.state.Provider# encodeValue() is converting the cookie value '8_u_' to 's:8_u_'
later it gets escaped to 's%3A8_u_'.

The value should have been decoded while the request is sent. Is this a bug ?
or is there any way to avoid this ?

Thanks.

imnilesh
27 Aug 2009, 3:00 AM
Hi,
I am using Ext.state.CookieProvider for tracking some of the client data.
I am setting the data using:


var myCookieProvider = new Ext.state.CookieProvider({name:"clientData"});

//setting the value
var value = '8_u_';
myCookieProvider.set('test', value);When I check the post data or check it on server side, I see that the cookie value has been escaped:

'8_u_' is sent as 's%3A8_u_' (extra 's%3A' added)
'8$u$' is sent as 's%3A8%24u%24'. (extra 's%3A' added, $ escaped)

After more debugging, observed that:
Ext.state.Provider# encodeValue() is converting the cookie value '8_u_' to 's:8_u_'
later it gets escaped to 's%3A8_u_'.

The value should have been decoded while the request is sent. Is this a bug ?
or is there any way to avoid this ?

Thanks.

Still facing the problem.. do I need to handle this on server side ?

mystix
27 Aug 2009, 3:01 AM
you'll most probably need to provide more info.
see http://extjs.com/forum/showthread.php?t=71015