[Zope-Checkins] CVS: Zope/lib/python/ZPublisher - HTTPResponse.py:1.71
Andy McKay
andy@agmweb.ca
Mon, 16 Dec 2002 19:38:17 -0500
Update of /cvs-repository/Zope/lib/python/ZPublisher
In directory cvs.zope.org:/tmp/cvs-serv2698/lib/python/ZPublisher
Modified Files:
HTTPResponse.py
Log Message:
Check in for #342 on behalf of slinkp
=== Zope/lib/python/ZPublisher/HTTPResponse.py 1.70 => 1.71 ===
--- Zope/lib/python/ZPublisher/HTTPResponse.py:1.70 Tue Sep 24 18:13:26 2002
+++ Zope/lib/python/ZPublisher/HTTPResponse.py Mon Dec 16 19:38:17 2002
@@ -423,10 +423,13 @@
return body.encode('latin1','replace')
def setBase(self,base):
- 'Set the base URL for the returned document.'
- if not base.endswith('/'):
+ """Set the base URL for the returned document.
+ If base is None, or the document already has a base, do nothing."""
+ if base is None:
+ base = ''
+ elif not base.endswith('/'):
base = base+'/'
- self.base = base
+ self.base = base
def insertBase(self,
base_re_search=re.compile('(<base.*?>)',re.I).search