The following works:
import cherrypy
devils_number = 66608
class HelloWorld(object):
@cherrypy.expose
def index(self):
return 't' * devils_number
cherrypy.quickstart(HelloWorld())
Now run it with:
devils_number = 66609
and the server (at least on my system) produces this error:
(This only happens when accessing the server from another computer)
...
File "/path/to/site-packages/cherrypy/wsgiserver/__init__.py", line
392, in simple_response
self.sendall("".join(buf))
File "<string>", line 1, in sendall
error: (35, 'Resource temporarily unavailable')
The point is:
It seems that there is a maximum size (66608).
I came across this problem while trying to return an image
directly.
Is there no way around this besides creating temporary files
and returning an HTML page with an image embedded?
Thanks.
It gets even stranger!
After not getting any 'print' output from simple_response on line 378
in wsgiserver/__init__.py, I realized that method isn't even being
called!
In fact, I removed that method entirely from the file, and the server
still functioned properly (still giving me the problems). The only
difference was that no error message was given anymore. This doesn't
make any sense!
What?
Could developers please pipe in and let me know what's going on.
Thanks.
After doing a lot of research, I found that "Resource temporarily
unavailable"
is supposed to have the error code 10 or 11, not 35. I copied
everything over
from a PowerPC macintosh to an x86 linux machine and the problems went
away.
Apparently Mac OS X has some problems.