Commit 2053aa6c authored by Guido van Rossum's avatar Guido van Rossum

Use SCRIPT_NAME (if defined) instead of hardcoding /cgi-bin/ when

sending the cookie.  (Suggestion by AMK.)
parent a74d0e4c
......@@ -150,7 +150,8 @@ def send_my_cookie(ui):
value = urllib.quote(value)
then = now + COOKIE_LIFETIME
gmt = time.gmtime(then)
print "Set-Cookie: %s=%s; path=/cgi-bin/;" % (name, value),
path = os.environ.get('SCRIPT_NAME', '/cgi-bin/')
print "Set-Cookie: %s=%s; path=%s;" % (name, value, path),
print time.strftime("expires=%a, %d-%b-%y %X GMT", gmt)
class MagicDict:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment