[Zope-Checkins] CVS: Zope/lib/python/ZPublisher - BaseRequest.py:1.49.4.3 Converters.py:1.18.4.2 HTTPRequest.py:1.80.2.3 HTTPResponse.py:1.69.2.1
Chris McDonough
chrism@zope.com
Sat, 28 Sep 2002 21:41:09 -0400
Update of /cvs-repository/Zope/lib/python/ZPublisher
In directory cvs.zope.org:/tmp/cvs-serv16902/lib/python/ZPublisher
Modified Files:
Tag: chrism-install-branch
BaseRequest.py Converters.py HTTPRequest.py HTTPResponse.py
Log Message:
Merge chrism-install-branch with head. Apologies for the spew.
=== Zope/lib/python/ZPublisher/BaseRequest.py 1.49.4.2 => 1.49.4.3 ===
=== Zope/lib/python/ZPublisher/Converters.py 1.18.4.1 => 1.18.4.2 ===
=== Zope/lib/python/ZPublisher/HTTPRequest.py 1.80.2.2 => 1.80.2.3 ===
--- Zope/lib/python/ZPublisher/HTTPRequest.py:1.80.2.2 Mon Sep 16 02:00:55 2002
+++ Zope/lib/python/ZPublisher/HTTPRequest.py Sat Sep 28 21:40:37 2002
@@ -14,6 +14,7 @@
__version__='$Revision$'[11:-2]
import re, sys, os, urllib, time, random, cgi, codecs
+from types import StringType, UnicodeType
from BaseRequest import BaseRequest
from HTTPResponse import HTTPResponse
from cgi import FieldStorage, escape
@@ -162,8 +163,8 @@
def setVirtualRoot(self, path, hard=0):
""" Treat the current publishing object as a VirtualRoot """
other = self.other
- if type(path) is type(''):
- path = path.split( '/')
+ if isinstance(path, StringType) or isinstance(path, UnicodeType):
+ path = path.split('/')
self._script[:] = map(quote, filter(None, path))
del self._steps[:]
parents = other['PARENTS']
@@ -1357,18 +1358,6 @@
try: del dict['HTTP_CGI_AUTHORIZATION']
except: pass
return dict
-
-
-def str_field(v):
- if type(v) is ListType:
- return map(str_field,v)
-
- if isinstance(v, FieldStorage):
- v=v.value
- elif type(v) is not StringType:
- if hasattr(v,'file') and v.file: v=v.file
- elif hasattr(v,'value'): v=v.value
- return v
class FileUpload:
=== Zope/lib/python/ZPublisher/HTTPResponse.py 1.69 => 1.69.2.1 ===
--- Zope/lib/python/ZPublisher/HTTPResponse.py:1.69 Tue Aug 20 23:09:31 2002
+++ Zope/lib/python/ZPublisher/HTTPResponse.py Sat Sep 28 21:40:37 2002
@@ -290,7 +290,7 @@
try:
body = str(body)
except UnicodeError:
- body = _encode_unicode(unicode(body))
+ body = self._encode_unicode(unicode(body))
l = len(body)
if ((l < 200) and body[:1] == '<' and body.find('>') == l-1 and