We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4cbd58f commit cf66af9Copy full SHA for cf66af9
server/taco_server.py
@@ -69,11 +69,19 @@ def do_POST(self):
69
except:
70
self.send_response(400)
71
72
+ response = str.encode(json.dumps(response))
73
+ lenResponse = len(response)
74
+
75
self.send_header('Access-Control-Allow-Origin', '*')
76
self.send_header('Content-type', 'application/json')
77
+ self.send_header('Content-Length', lenResponse)
78
self.end_headers()
79
- self.wfile.write(str.encode(json.dumps(response)))
80
+ i = 0
81
+ while i < lenResponse:
82
+ end = min(i + 10000, lenResponse)
83
+ self.wfile.write(response[i:end])
84
+ i = end
85
86
class ThreadedHTTPServer(ThreadingMixIn, HTTPServer):
87
def finish_request(self, request, client_address):
0 commit comments