Commit 641c148c authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

make timerserver works in Zope-2.12 too.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@41931 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 4e691d37
...@@ -23,7 +23,7 @@ except ImportError: ...@@ -23,7 +23,7 @@ except ImportError:
from distutils.core import setup from distutils.core import setup
setup(name='timerserver', setup(name='timerserver',
version='2.0', version=version,
license='GPL', license='GPL',
description='Timer Server for Zope', description='Timer Server for Zope',
long_description='', long_description='',
......
...@@ -15,6 +15,7 @@ from ZServer.PubCore import handle ...@@ -15,6 +15,7 @@ from ZServer.PubCore import handle
from ZPublisher.BaseRequest import BaseRequest from ZPublisher.BaseRequest import BaseRequest
from ZPublisher.BaseResponse import BaseResponse from ZPublisher.BaseResponse import BaseResponse
from ZPublisher.HTTPRequest import HTTPRequest from ZPublisher.HTTPRequest import HTTPRequest
from ZPublisher.HTTPResponse import HTTPResponse
import ZPublisher.HTTPRequest import ZPublisher.HTTPRequest
class TimerServer: class TimerServer:
...@@ -147,3 +148,17 @@ class TimerRequest(HTTPRequest): ...@@ -147,3 +148,17 @@ class TimerRequest(HTTPRequest):
env['PATH_INFO']= '/Control_Panel/timer_service/process_timer' env['PATH_INFO']= '/Control_Panel/timer_service/process_timer'
return env return env
def clone(self):
# This method is a dumb copy of Zope-2.8's one that makes timerserver
# works in Zope-2.12 too.
#
# Return a clone of the current request object
# that may be used to perform object traversal.
environ = self.environ.copy()
environ['REQUEST_METHOD'] = 'GET'
if self._auth:
environ['HTTP_AUTHORIZATION'] = self._auth
clone = HTTPRequest(None, environ, HTTPResponse(), clean=1)
clone['PARENTS'] = [self['PARENTS'][-1]]
return clone
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment