Dietmar Schwertberger wrote:
> In <URL:news:local.News> on Wed 03 Sep,
> webware-discuss@... wrote:
>> --> Tuesday, September 2, 2003, 4:31:26 PM,
> maillist@... wrote:
>>> In <URL:news:local.News> on Tue 02 Sep, Ian Bicking wrote:
>>> I thought that 'StreamOut Error' is a message from mod_python which
>>> is just printed to stderr. But then there's the post from
>>> Matt/Geoff suggesting this is an OS problem.
>> If Webware doesn't have a timeout as Ian mentioned, then the
>> 'Software cause connection abort' message being seen seems to make
>> sense when Apache reaches its Timeout limit and kills the
>> connection, at which point Webware is probably confused and Python
>> is reporting the error.
>> Has either of you just tried setting the Apache Timeout directive
>> very high?
> The problem ist surely not timeout related as it immediately happens
> after cancelling the transfer.
>> From the sources of NewThreadedAppServer.py:
> from WebKit.ASStreamOut import ASStreamOut
> class TASASStreamOut(ASStreamOut):
> def __init__(self, sock):
> self._socket = sock
> def flush(self):
> result = ASStreamOut.flush(self)
> if result: ##a true return value means we can send
> len(self._buffer) sent = 0
> while sent < reslen:
> sent = sent +
> except socket.error, e:
> if e==errno.EPIPE:
> #broken pipe
> "StreamOut Error: ", e
> This just ignores the socket.error. I think it would be a good idea
> to give the application a possibility to find out about the error
> state, e.g. through setting an error flag or a return value.
> I'm not sure about the errno.EPIPE, but if the pipe is broken, what
> sense does it make to re-try sending more data?
It would make more sense to raise an exception and therefore end the servlet
processing. This could be similar to the way you can raise EndResponse to
end the servlet processing.
If you want to implement this, test it, and submit a patch, we'd appreciate
Get latest updates about Open Source Projects, Conferences and News.