I did a monkey patch in my script for the issue described in ticket
#909
Perhaps you're interested to assume the procedure in the cherrypy
sources.
Fact is, I could reproduce the bug on different pc's running
WindowXP
and this workaround helps so far.
import socket
from cherrypy.wsgiserver import CP_fileobject
CP_fileobject_sendall = CP_fileobject.sendall
def _sendall(self, data):
""" Monkeypatch for cherrypy ticket #909 """
try:
CP_fileobject_sendall(self, data)
except socket.error, e:
if e.args[0] == 10055:
# 10055 -> "No buffer space available"
# try to send the data in smaller parts
block = 1024 ** 2 # 1 MB
for pos in xrange(0, len(data), block):
CP_fileobject_sendall(self, data[pos:pos+block])
else:
raise
CP_fileobject.sendall = _sendall
Zap
On 7 Mai, 06:03, Zap <
z...@lancraft.net> wrote:
> I've checked dirks example fromhttp://
www.cherrypy.org/ticket/909