[Zope-CVS] CVS: Packages/HTTPMounter - HTTPMounter.py:1.3
Andreas Jung
andreas@digicool.com
Thu, 16 May 2002 13:05:34 -0400
Update of /cvs-repository/Packages/HTTPMounter
In directory cvs.zope.org:/tmp/cvs-serv20920
Modified Files:
HTTPMounter.py
Log Message:
- using string.join() to make HTTPMounter work with older Zope versions
- fixed minor bug
=== Packages/HTTPMounter/HTTPMounter.py 1.2 => 1.3 ===
from OFS.SimpleItem import SimpleItem
from Acquisition import Implicit
+import string
import urllib
@@ -55,11 +56,11 @@
def __call__(self, REQUEST, RESPONSE):
""" """
- own_path = '/'.join(self.getPhysicalPath())
+ own_path = string.join(self.getPhysicalPath(), '/')
sub_path = REQUEST['PATH_TRANSLATED'].replace(own_path,'')
if not sub_path: sub_path = self.default_document
url = self.url
- if url[-1] != '/': url = url = '/'
+ if url[-1] != '/': url = url + '/'
url = url + sub_path
data = urllib.urlopen(url).read()
return data