[Moin-devel] CVS: MoinMoin/webapi cgiMoin.py,1.14,1.15

J?rgen Hermann jhermann at users.sourceforge.net
Sat Jun 8 15:03:51 EDT 2002


Update of /cvsroot/moin/MoinMoin/webapi
In directory usw-pr-cvs1:/tmp/cvs-serv6188/webapi

Modified Files:
	cgiMoin.py 
Log Message:
Removed print & string from cgiMain


Index: cgiMoin.py
===================================================================
RCS file: /cvsroot/moin/MoinMoin/webapi/cgiMoin.py,v
retrieving revision 1.14
retrieving revision 1.15
diff -C2 -r1.14 -r1.15
*** cgiMoin.py	22 May 2002 19:08:19 -0000	1.14
--- cgiMoin.py	8 Jun 2002 09:40:09 -0000	1.15
***************
*** 13,17 ****
  
  # Imports
! import os, string, sys
  
  #############################################################################
--- 13,17 ----
  
  # Imports
! import os, sys
  
  #############################################################################
***************
*** 39,43 ****
      if os.name == 'nt':
          scriptname = getScriptname()
!         if string.find(pathinfo, scriptname) == 0:
              pathinfo = pathinfo[len(scriptname):]
  
--- 39,43 ----
      if os.name == 'nt':
          scriptname = getScriptname()
!         if pathinfo.startswith(scriptname):
              pathinfo = pathinfo[len(scriptname):]
  
***************
*** 109,126 ****
      # send http headers
      for header in more_headers:
!         if string.lower(header)[:13] == "content-type:": have_ct = 1
!         print header
  
      for header in request.user_headers:
!         if string.lower(header)[:13] == "content-type:": have_ct = 1
!         print header
  
      if not have_ct:
!         print "Content-type: text/html;charset=%s" % config.charset
  
!     #print "Pragma: no-cache"
!     #print "Cache-control: no-cache"
!     #!!! Better set expiry to some 10 mins or so for normal pages?
!     print
  
      #from pprint import pformat
--- 109,123 ----
      # send http headers
      for header in more_headers:
!         if header.lower().startswith("content-type:"): have_ct = 1
!         request.write(header, '\r\n')
  
      for header in request.user_headers:
!         if header.lower().startswith("content-type:"): have_ct = 1
!         request.write(header, '\r\n')
  
      if not have_ct:
!         request.write("Content-type: text/html;charset=%s\r\n" % config.charset)
  
!     request.write('\r\n')
  
      #from pprint import pformat
***************
*** 131,135 ****
  def http_redirect(request, url):
      """ Redirect to a fully qualified, or server-rooted URL """
!     if string.count(url, "://") == 0:
          url = getQualifiedURL(url)
  
--- 128,132 ----
  def http_redirect(request, url):
      """ Redirect to a fully qualified, or server-rooted URL """
!     if url.find("://") == -1:
          url = getQualifiedURL(url)
  





More information about the Moin-devel mailing list