|
|
|
@ -71,12 +71,17 @@ class RequestHandler(BaseHTTPRequestHandler):
|
|
|
|
|
|
|
|
|
|
content_length = int(self.headers['Content-Length'])
|
|
|
|
|
body = self.rfile.read(content_length)
|
|
|
|
|
params = parse_qs(body.decode('utf-8'))["main"]
|
|
|
|
|
params = parse_qs(body.decode('utf-8'))["main"][0]
|
|
|
|
|
ic(params)
|
|
|
|
|
|
|
|
|
|
#Set limit pixels for 1 response
|
|
|
|
|
ic(len(params))
|
|
|
|
|
if len(params) > 5685:
|
|
|
|
|
return 0
|
|
|
|
|
|
|
|
|
|
matrix = self.get_matrix()
|
|
|
|
|
|
|
|
|
|
ll = unpack(params[0])
|
|
|
|
|
ll = unpack(params)
|
|
|
|
|
for i in ll:
|
|
|
|
|
x = i[1] ; y = i[0] #Fix (y, x) -> (x, y) on server side
|
|
|
|
|
matrix[x, y] = [i[2], i[3], i[4]]
|
|
|
|
|