Hello,
After a day of debugging I came to the finding that at some places the request and response gets faked after a retry occurred.
zope.app.testing.functional calls the publisher like this: publish(request, handle_errors=handle_errors) deep in publish a new instance of request is created in case of a retry old one dropped, works on the new one def publish(request, handle_errors=True): ... return request (returns the newly instantiated request) back to zope.app.testing.functional: publish(request, handle_errors=handle_errors) it just drops the return value
I found the following likely places that could be affected:
zope.app.testing.functional response = ResponseWrapper(request.response, path) if env.has_key('HTTP_COOKIE'): self.loadCookies(env['HTTP_COOKIE']) publish(request, handle_errors=handle_errors) self.saveCookies(response) ... response = ResponseWrapper(request.response, path) publish(request, handle_errors=handle_errors) return response
zope.server.ftp.publisher.py: response = request.response publish(request) return response.getResult()
zope.app.twisted.ftp.utils.py: response = request.response publish(request) return response.getResult()
zope.app.debug.debug.py: request = self._request(path, stdin, *args, **kw) getStatus = getattr(request.response, 'getStatus', lambda: None) _publish(request
Anybody for/against fixing those?
On Thu, Jan 31, 2008 at 07:21:30PM +0100, Adam Groszer wrote:
After a day of debugging I came to the finding that at some places the request and response gets faked after a retry occurred.
zope.app.testing.functional calls the publisher like this: publish(request, handle_errors=handle_errors) deep in publish a new instance of request is created in case of a retry old one dropped, works on the new one def publish(request, handle_errors=True): ... return request (returns the newly instantiated request) back to zope.app.testing.functional: publish(request, handle_errors=handle_errors) it just drops the return value
I found the following likely places that could be affected:
zope.app.testing.functional response = ResponseWrapper(request.response, path) if env.has_key('HTTP_COOKIE'): self.loadCookies(env['HTTP_COOKIE']) publish(request, handle_errors=handle_errors) self.saveCookies(response) ... response = ResponseWrapper(request.response, path) publish(request, handle_errors=handle_errors) return response
zope.server.ftp.publisher.py: response = request.response publish(request) return response.getResult()
zope.app.twisted.ftp.utils.py: response = request.response publish(request) return response.getResult()
zope.app.debug.debug.py: request = self._request(path, stdin, *args, **kw) getStatus = getattr(request.response, 'getStatus', lambda: None) _publish(request
Anybody for/against fixing those?
I think I might be responsible for the one in zope.app.testing.functional, and I seem to remember that I used the zope.app.debug code as an example.
+1 for fixing all of them, assuming you know how to fix them :)
Marius Gedminas