summaryrefslogtreecommitdiffstats
path: root/Tools
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-05-23 19:18:35 (GMT)
committerGuido van Rossum <guido@python.org>1997-05-23 19:18:35 (GMT)
commit1d57981015feadac09152ae8314112fcb0117b82 (patch)
treed7a2c44019a5a07d00d05615665abf158c0d09ac /Tools
parent1dcc24404bd0414d44ae6e0d216f003d7b6c7af5 (diff)
downloadcpython-1d57981015feadac09152ae8314112fcb0117b82.zip
cpython-1d57981015feadac09152ae8314112fcb0117b82.tar.gz
cpython-1d57981015feadac09152ae8314112fcb0117b82.tar.bz2
Nits.
Use TARGET=rlog instead of _blank for rlog output. Add missing mailto: to author's email address in Last changed link. Forget about the domainname in the cookie; the default is just fine.
Diffstat (limited to 'Tools')
-rw-r--r--Tools/faqwiz/faqmain.py15
1 files changed, 7 insertions, 8 deletions
diff --git a/Tools/faqwiz/faqmain.py b/Tools/faqwiz/faqmain.py
index 03f0a24..12eca59 100644
--- a/Tools/faqwiz/faqmain.py
+++ b/Tools/faqwiz/faqmain.py
@@ -522,13 +522,12 @@ class FAQServer:
value = "%s;%s" % (author, email)
import urllib
value = urllib.quote(value)
- try:
- hostname = os.environ['HTTP_HOST']
- except KeyError:
- hostname = os.environ['SERVER_NAME']
print "Set-Cookie: %s=%s; path=/cgi-bin/;" % (name, value),
- print "domain=%s;" % hostname,
- print "expires=Sat, 01-Jan-2000 00:00:00 GMT"
+ import time
+ now = time.time()
+ then = now + 28 * 24 * 3600
+ gmt = time.gmtime(then)
+ print time.strftime("expires=%a, %d-%b-%x %X GMT", gmt)
def get_cookie(self):
if not os.environ.has_key('HTTP_COOKIE'):
@@ -654,7 +653,7 @@ class FAQServer:
if edit:
print """
<A HREF="faq.py?req=edit&name=%s">Edit this entry</A> /
- <A HREF="faq.py?req=info&name=%s" TARGET=_blank>Log info</A>
+ <A HREF="faq.py?req=info&name=%s" TARGET=rlog>Log info</A>
""" % (name, name)
if self.headers:
try:
@@ -664,7 +663,7 @@ class FAQServer:
except KeyError:
pass
else:
- s = '/ Last changed on %s by <A HREF="%s">%s</A>'
+ s = '/ Last changed on %s by <A HREF="mailto:%s">%s</A>'
print s % (date, email, author)
print '<P>'
print "<HR>"