PDA

View Full Version : Fetching Response header set cookie value



vinvishwa007
11 Sep 2013, 10:34 PM
Hi,
I am trying to figure out a way to access the values from Set-Cookie from Ajax response e.g the SPRING_SECURITY_REMEMBER_ME_COOKIE below.
response.getAllResponseHeaders() did not work.
nor did Ext.util.Cookies.
Any ideas???

snapshot from chrome developer tools -



Content-Length:
7
Content-Type:
text/plain;charset=ISO-8859-1
Date:
Thu, 12 Sep 2013 06:08:02 GMT
Server:
Apache-Coyote/1.1
Set-Cookie:
SPRING_SECURITY_REMEMBER_ME_COOKIE=ZGdWeHVMWWdZRUxUTWg5R01pVDNadz09OmhaZVlGOUlhN0QxMTBtYk1ueVhqd3c9PQ; Path=/supcon-supplier-mgmt


Thanks ,
Vinod

ettavolt
12 Sep 2013, 1:45 AM
response.getAllResponseHeaders() won't work, because cookies are 'secured' headers.
If Ext.util.Cookies.get('SPRING_SECURITY_REMEMBER_ME_COOKIE') returns empty, then you have no access to that cookie at all.

Kombra
23 Jun 2014, 3:37 AM
Hi Vinod,

I am facing the same problem.
I am not Not able to get "set cookie" from response Header.

Did you manage to solve it.

If Yes, Please let me know what is the approach i should follow.

Regards
Kombra



Hi,
I am trying to figure out a way to access the values from Set-Cookie from Ajax response e.g the SPRING_SECURITY_REMEMBER_ME_COOKIE below.
response.getAllResponseHeaders() did not work.
nor did Ext.util.Cookies.
Any ideas???

snapshot from chrome developer tools -



Content-Length:
7
Content-Type:
text/plain;charset=ISO-8859-1
Date:
Thu, 12 Sep 2013 06:08:02 GMT
Server:
Apache-Coyote/1.1
Set-Cookie:
SPRING_SECURITY_REMEMBER_ME_COOKIE=ZGdWeHVMWWdZRUxUTWg5R01pVDNadz09OmhaZVlGOUlhN0QxMTBtYk1ueVhqd3c9PQ; Path=/supcon-supplier-mgmt


Thanks ,
Vinod