| 1 |
#!/usr/bin/python
|
| 2 |
# vim: expandtab
|
| 3 |
|
| 4 |
# Copyright 2009 Raphael Hertzog
|
| 5 |
# Available under the terms of the General Public License version 2
|
| 6 |
# or (at your option) any later version.
|
| 7 |
|
| 8 |
import cgi, Cookie, os
|
| 9 |
#import cgitb
|
| 10 |
#cgitb.enable()
|
| 11 |
|
| 12 |
form = cgi.FieldStorage()
|
| 13 |
if (form.has_key("csspref")):
|
| 14 |
c = Cookie.SimpleCookie()
|
| 15 |
c["csspref"] = form["csspref"].value
|
| 16 |
c["csspref"]["max-age"] = 1531263600
|
| 17 |
c["csspref"]["path"] = "/"
|
| 18 |
print c
|
| 19 |
|
| 20 |
print "Location: " + os.getenv("HTTP_REFERER", "http://packages.qa.debian.org")
|
| 21 |
print
|
| 22 |
|