Question

My goal is that I want to log into a site with some java code and do some work when logged in. (in order to write some java cooking handling I first need to understand how this all actually works) The problem is that I can't quite figure out how to manage the cookie session. Here's what I've observed when using chrome's dev. tools: 1) on first request for the site's url I send no cookies and I get some in response:

Set-Cookie:PHPSESSID=la2ek8vq9bbu0rjngl2o67aop6; path=/; domain=.mtel.bg; HttpOnly
Set-Cookie:PHPSESSID=d32cj0v5j4mj4nt43jbhb9hbc5; path=/; domain=.mtel.bg; HttpOnly

2) on moving on log page I now send (on HTTP GET):

    Cookie:PHPSESSID=d32cj0v5j4mj4nt43jbhb9hbc5; 
            __utma=209782857.1075318979.1349352741.1349352741.1349352741.1;
            __utmb=209782857.1.10.1349352741;
            __utmc=209782857;
 __utmz=209782857.1349352741.1.1.utmcsr=(direct)|utmccn=(direct)|utmcmd=(none); 
__atuvc=1%7C40

and indeed when I check my stored cookies (after my first get request for the site's main url) in chrome's cookie tab - they exist in the way they're passed on the next get/post request. Can you explain what's really happening after my 1st cookies are received and why such name/value pairs are stored?

Was it helpful?

Solution

There's a Javascript from Google Analytics on the page which sets some cookies.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top