[issue37254] POST large file to server (using http.server.CGIHTTPRequestHandler), always reset by server.

2019-06-12 Thread shajianrui
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

[issue37301] CGIHTTPServer doesn't handle long POST requests

2019-06-16 Thread shajianrui
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

[issue37301] CGIHTTPServer doesn't handle long POST requests

2019-06-18 Thread shajianrui
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

[issue37301] CGIHTTPServer doesn't handle long POST requests

2019-06-19 Thread shajianrui
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

[issue37301] CGIHTTPServer doesn't handle long POST requests

2019-06-22 Thread shajianrui
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