I'm writing a bot that mimics my browser, Chrome.
In Chrome, when I interact with the website I'm interested in, the website passes back a cookie "session" using the "Set-Cookie" header in the HTTP response. *However*, on the next HTTP request from the browser, the request headers have an entry "Cookie" with an *altered* value.
Please read my assumptions/guesses about what is happening, and comment if they are valid assumptions or not:
(1) the browser has changed the cookie's value (explanation: the server sent valueA in its http response, but now the browser is using valueB in its next http request)
If assumption (1) is true...
if assumption (2) is true...
if assumption (3) is true...
(4) I should be able to find the code that changes the cookie value by searching for ".cookie=" (or similar with whitespace). (Explanation: http://www.w3schools.com/jsref/dom_obj_document.asp
shows that the syntax for changing a cookie is document.cookie = "session=abc94g290" for example. Document may be assigned to a variable, so not safe to search for "document.cookie=")
Ok, following this logic, only two instances of ".cookie=" turn up.
one is in analytics.js
the other is in jquery-ui.min.js
if not (as I suspect), then what is changing it??