Update of /cvsroot/tmda/tmda/contrib/cgi
In directory sc8-pr-cvs1:/tmp/cvs-serv5724

Modified Files:
        CgiUtil.py Login.py Pending.py Release.py View.py tmda-cgi.py 
Log Message:
Moved content-type declaration into main program and removed no-cache
instructions.


Index: CgiUtil.py
===================================================================
RCS file: /cvsroot/tmda/tmda/contrib/cgi/CgiUtil.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- CgiUtil.py  6 Dec 2002 17:19:06 -0000       1.4
+++ CgiUtil.py  12 Dec 2002 22:26:20 -0000      1.5
@@ -57,13 +57,7 @@
   return "%s file <tt>%s</tt>, permissions %s" % (Desc, Filename, Perm)
 
 def TermError(Err, Cause, Failed, Other, Recommend):
-  print """Expires: Mon, 26 Jul 1997 05:00:00 GMT
-Last-Modified: %s GMT
-Cache-Control: no-cache, must-revalidate
-Pragma: no-cache
-Content-type: text/html
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+  print """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
 <title>tmda-cgi Error</title>
@@ -94,7 +88,6 @@
   </tr>
 </table>
 </body>
-</html>""" % (time.strftime("%a, %d %b %Y %H:%M:%S"), Err, Cause, 
-    os.environ["TMDA_CGI_MODE"], Failed, os.geteuid(), os.getegid(), Other, 
-    Recommend)
+</html>""" % (Err, Cause, os.environ["TMDA_CGI_MODE"], Failed, os.geteuid(),
+  os.getegid(), Other, Recommend)
   sys.exit(0)

Index: Login.py
===================================================================
RCS file: /cvsroot/tmda/tmda/contrib/cgi/Login.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Login.py    30 Nov 2002 18:10:43 -0000      1.3
+++ Login.py    12 Dec 2002 22:26:22 -0000      1.4
@@ -26,9 +26,7 @@
 def Show(Msg = "Please enter your login information.", Debug = 0):
   "Show a login form in HTML."
 
-  print """Content-type: text/html
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+  print """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
 <title>TMDA Login</title>

Index: Pending.py
===================================================================
RCS file: /cvsroot/tmda/tmda/contrib/cgi/Pending.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- Pending.py  12 Dec 2002 22:07:46 -0000      1.6
+++ Pending.py  12 Dec 2002 22:26:22 -0000      1.7
@@ -39,14 +39,6 @@
 def Show():
   "Show all pending e-mail in an HTML form."
 
-  print """Expires: Mon, 26 Jul 1997 05:00:00 GMT
-Last-Modified: %s GMT
-Cache-Control: no-cache, must-revalidate
-Pragma: no-cache
-Content-type: text/html
-
-""" % time.strftime("%a, %d %b %Y %H:%M:%S")
-
   if Form.has_key("subcmd"):
     # Change sorting direction?
     if Form["subcmd"].value == "desc": PVars["SortDir"] = "desc"

Index: Release.py
===================================================================
RCS file: /cvsroot/tmda/tmda/contrib/cgi/Release.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Release.py  7 Dec 2002 02:50:44 -0000       1.3
+++ Release.py  12 Dec 2002 22:26:23 -0000      1.4
@@ -100,8 +100,6 @@
       "retrieve pending e-mail", "",
       "Recheck link or contact TMDA programmers.")
 
-  print "Content-type: text/html\n"
-  
   print """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>

Index: View.py
===================================================================
RCS file: /cvsroot/tmda/tmda/contrib/cgi/View.py,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- View.py     12 Dec 2002 22:04:59 -0000      1.7
+++ View.py     12 Dec 2002 22:26:23 -0000      1.8
@@ -249,9 +249,7 @@
 
 
   # Display HTML page with email included.
-  print """Content-type: text/html
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+  print """<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
 <html>
 <head>
 <title>View E-mail</title>

Index: tmda-cgi.py
===================================================================
RCS file: /cvsroot/tmda/tmda/contrib/cgi/tmda-cgi.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- tmda-cgi.py 6 Dec 2002 17:16:53 -0000       1.4
+++ tmda-cgi.py 12 Dec 2002 22:26:23 -0000      1.5
@@ -58,6 +58,8 @@
 def main():
   "Figure out which page we're on and pass control along."
 
+  print "Content-type: text/html\n"
+
   # First visit to any page?
   if not Form.keys():
     # Release an e-mail by URL?
@@ -109,7 +111,7 @@
       PVars.Save()
       View.Show()
 
-  else: print "Content-type: text/html\n\nNo command.<p>"
+  else: print "No command.<p>"
 
   #print "<hr> Everything below this line is experimental.<p>"
   #cgi.print_environ()

_______________________________________
tmda-cvs mailing list
http://tmda.net/lists/listinfo/tmda-cvs

Reply via email to