I’m using Google App Engine to build a website for my High School’s drama club, and it works perfectly in Chrome, Firefox, etc. However, (as you would expect) it doesn’t work in Internet Explorer.
When a user logs in, it sets a cookie in the following form ‘4|55b4e2aea49a225f1a8e436df051c678’, where 4 is the id of the user, followed by a hashed version.
I have a custom handler that all of my classes inherit that sets cookies.
def set_cookie(self, name, value):
val = self.make_secure_val(value)
logging.debug(val)
return self.response.headers.add_header("Set-Cookie", "%s=%s; Path='/'" % (name, val))
def make_secure_val(self, val):
return '%s|%s' % (val, hmac.new(secret, val).hexdigest())
After it sets the cookie, I have another logging line that outputs the value of the cookie. The value that gets set to the cookie is correct, however, the cookie never gets set.
I’ve tried changing all of IE’s cookie settings to accept all cookies. However, it doesn’t make a difference. I can set a cookie in Javascript and it works fine. However, it should be working in Python as well. I’ve tried adding an expiration date, but that doesn’t make a difference as well.
In my reasearch, I’ve noticed a lot of people have problems with IE cookies with an iframe, however, that doesn’t apply to me.
Any help is greatly appreciated.
Well As far as I can see all broswers receive the set-cookie header.
Then, when the browsers makes the redirection to
http://hermantowndrama.appspot.com/the “user” cookie is not sent to the server, but the “test” cookieAs
http://hermantowndrama.appspot.com/is a subdomain, probably there is a problem/bug with thepath="of theusercookie, you can try to remove it.Sorry but the images doesn’t help to much because the resolution, anyway they are only to illustrate that the browsers receive the header but don’t send back the user cookie.