[Zope-Checkins] CVS: Zope/lib/python/ZPublisher - HTTPResponse.py:1.66
Andreas Jung
andreas@digicool.com
Sat, 22 Jun 2002 11:49:59 -0400
Update of /cvs-repository/Zope/lib/python/ZPublisher
In directory cvs.zope.org:/tmp/cvs-serv15679
Modified Files:
HTTPResponse.py
Log Message:
- minor cleanup
- removed obsolete code trying to deal with a trailing 'L' for longs
=== Zope/lib/python/ZPublisher/HTTPResponse.py 1.65 => 1.66 ===
def setBase(self,base):
'Set the base URL for the returned document.'
- if base[-1:] != '/':
+ if not base.endswith('/'):
base = base+'/'
self.base = base
@@ -787,16 +787,6 @@
if not headers.has_key('content-length') and \
not headers.has_key('transfer-encoding'):
self.setHeader('content-length',len(body))
-
- # ugh - str(content-length) could be a Python long, which will
- # produce a trailing 'L' :( This can go away when we move to
- # Python 2.0...
- content_length= headers.get('content-length', None)
- if type(content_length) is LongType:
- str_rep = str(content_length)
- if str_rep[-1:] == 'L':
- str_rep = str_rep[:-1]
- self.setHeader('content-length', str_rep)
headersl = []
append = headersl.append