30 Jul
2004
30 Jul
'04
8:02 p.m.
Ames Andreas (MPA/DF) wrote at 2004-7-30 15:44 +0200:
I've stumbled over some code in Zope 2.7.0 that seems to suggest that input streams are meant to be seekable. In an extension I wrote for ZServer, i.e. AJPServer, I throw an exception when this is tried and I'm quite sure the call to seek wasn't there in 2.6.x. I found the call to seek in ZPublisher.HTTPRequest.py, line 128, in method "retry".
Does this mean that only seekable streams are allowed in ZPublisher (i.e. not stdin) or is this a bug?
ZServer usually streams the input stream via a temporary file. Therefore, ZPublisher can expect that its "stdin" is indeed seekable. As you found out, this is necessary when a request needs to be retried. -- Dieter