[jboss-jira] [JBoss JIRA] Created: (JBAS-8156) When cookie is set and retrieved, the value get surronded by double quotes

Adeeb Abdulkarim (JIRA) jira-events at lists.jboss.org
Wed Jul 7 11:07:46 EDT 2010


When cookie is set and retrieved, the value get surronded by double quotes
--------------------------------------------------------------------------

                 Key: JBAS-8156
                 URL: https://jira.jboss.org/browse/JBAS-8156
             Project: JBoss Application Server
          Issue Type: Bug
      Security Level: Public (Everyone can see)
         Environment: Linux 2.6.18-92.el5xen #1 SMP Tue Apr 29 13:31:30 EDT 2008 x86_64 
JBOSS Version: jboss-eap-4.3.0.GA CP06 
            Reporter: Adeeb Abdulkarim


When cookie is set and then get the value get surronded by double quotes. 
E.g. 
Cookie appCookie = new Cookie("applpath", "/MyAppRoot"); 
resp.addCookie(appCookie); 

Accessing at client side (JS) 
function getColorCookie(sName) { 
	var aCookie = document.cookie.split("; "); 
	for (var i=0; i < aCookie.length; i++) { 
		var aCrumb = aCookie[i].split("="); 
		if (sName == aCrumb[0]) 
		return unescape(aCrumb[1]); 
	} 
	return null; 
	} 
Expected Result: applpath = /MyAppRoot 
Actual Result: applpath = "/MyAppRoot" 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list