New submission from shajianrui :
Windows 10, python 3.7
I met a problem when using the http.server module. I set up a base server with
class HTTPServer and CGIHTTPRequestHandler(Not using thread or fork) and tried
to POST a large file (>2MB), then I find the server always reset
shajianrui added the comment:
I have the same problem, and use a similar walk-around:
1. I set the rbufsize to -1
2. I use self.connection.recv instead of self.rfile.read(), like this:
while select.select([self.connection], [], [], 0)[0]:
if not self.connection.recv(1):
However
shajianrui added the comment:
@vsbogd,Thank you for your reply. But I find another problem.
I derive a subclass from sockerserver.StreamRequestHandler, and set the
rbufsize to 0(As CGIHTTPRequestHandler do), like this demo below:
testserver.py:
import socketserver
shajianrui added the comment:
Yes I reproduce this problem with a slight modification to your demo.
Using your origianl version I fail to reproduce, maybe 2*65536 bytes size is
too small.
I just change the size of data (in test_cgi_client.py ) to 8*65536, 16*65536
and 32*65536, and the
shajianrui added the comment:
Sorry for replying so late, and thank you very much for your reply and
explanation.
At first reply to you last post: I think at least in the non-unix environment,
the CGIHTTPRequestHandler read the whole(expected) data from rfile and then
transfer it to the