i am trying to set a cookie with TG2 like

cookie = Cookie.SimpleCookie()
            cookie["ADAM-TEST"] = "random.randint(1000000000)"
            cookie["ADAM-TEST"]["domain"] = ".jayconrod.com"
            cookie["ADAM-TEST"]["path"] = "/"
            cookie["ADAM-TEST"]["expires"] = \
            expiration.strftime("%a, %d-%b-%Y %H:%M:%S PST")

When i do the following

print "Content-type: text/plain"
            print cookie.output()
            print "Cookie set with: " + cookie.output()

i get the cookie printed out. But when i check the browsers cookies i get nothing. I need the cookie to be set within the browsers cookies. What am i missing?

7 Years
Discussion Span
Last Post by ov3rcl0ck

Are you sure the cookie gets put into your browser, because im pretty sure cookielib is for use with urllib/2 and httplib. However you could probably save a cookie in the right format to your browsers cookie cache. I might be wrong, but i doubt cookielib has anything to do with your Web Browser, once again its for use with HTTPlib and urllib 1 and 2.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.