he Cookie info would be placed in the HTTP header
Set-Cookie: name = VALUE;
expires = DATE;
path = PATH;
domain = DOMAIN_NAME;
In Python, we can use the Cookie lib:Set a simple cookie easily:
import Cookie import sys, os cookie=Cookie.SimpleCookie() cookie['user'] = "user" print cookie print '''Content-Type: text/html <html> </html> '''
Read the cookie from the server:
test_cookie=Cookie.SimpleCookie() test_cookie.load(os.environ.get('HTTP_COOKIE', ''))So, we can see that the cookie is stored in the environment variable of server.