1.1 --- a/README.txt Thu Nov 04 17:11:21 2004 +0000
1.2 +++ b/README.txt Mon Nov 15 23:35:31 2004 +0000
1.3 @@ -37,6 +37,7 @@
1.4 stop the processing/production of a response; this is useful when resources
1.5 need to issue a redirect without unnecessary content being generated, for
1.6 example.
1.7 +Fixed path information for Zope.
1.8
1.9 New in WebStack 0.7 (Changes Since WebStack 0.6)
1.10 ------------------------------------------------
2.1 --- a/WebStack/Adapters/Zope.py Thu Nov 04 17:11:21 2004 +0000
2.2 +++ b/WebStack/Adapters/Zope.py Mon Nov 15 23:35:31 2004 +0000
2.3 @@ -44,8 +44,10 @@
2.4 resource.
2.5 """
2.6
2.7 + # Provide the adapter so that "path info" can be determined correctly.
2.8 +
2.9 if REQUEST is not None:
2.10 - trans = WebStack.Zope.Transaction(REQUEST)
2.11 + trans = WebStack.Zope.Transaction(REQUEST, self)
2.12 else:
2.13 raise "Internal Error"
2.14
3.1 --- a/WebStack/Zope.py Thu Nov 04 17:11:21 2004 +0000
3.2 +++ b/WebStack/Zope.py Mon Nov 15 23:35:31 2004 +0000
3.3 @@ -19,14 +19,16 @@
3.4 Zope transaction interface.
3.5 """
3.6
3.7 - def __init__(self, request):
3.8 + def __init__(self, request, adapter):
3.9
3.10 """
3.11 - Initialise the transaction with the Zope 'request' object.
3.12 + Initialise the transaction with the Zope 'request' object and the
3.13 + 'adapter' which created this transaction.
3.14 """
3.15
3.16 self.request = request
3.17 self.response = request.RESPONSE
3.18 + self.adapter = adapter
3.19
3.20 # Cached information.
3.21
3.22 @@ -140,7 +142,9 @@
3.23 handling the current request) from the request.
3.24 """
3.25
3.26 - return self.request.environ.get("PATH_INFO") or ""
3.27 + product_path = "/".join(self.adapter.getPhysicalPath())
3.28 + path_info = self.request.environ.get("PATH_INFO") or ""
3.29 + return path_info[len(product_path):]
3.30
3.31 def get_query_string(self):
3.32
4.1 --- a/docs/PATH.txt Thu Nov 04 17:11:21 2004 +0000
4.2 +++ b/docs/PATH.txt Mon Nov 15 23:35:31 2004 +0000
4.3 @@ -10,4 +10,4 @@
4.4 Twisted Same as path (correct)
4.5 Webware <= 0.8.1 Not supported (needs ExtraPathInfo support)
4.6 Webware > 0.8.1 Path beyond context (correct)
4.7 -Zope 2.7.2-0 Same as path (should be path beyond resource)
4.8 +Zope 2.7.2-0 Same as path (correct)