found why tornado doesn't work

This commit is contained in:
Chuang Zhu 2020-12-13 00:56:39 +08:00
parent 4b10bc9b98
commit ff45f465e6

View File

@ -23,7 +23,7 @@ class PostHandler(RequestHandler):
def post(self): def post(self):
self.set_header('Content-Type', 'text/plain') self.set_header('Content-Type', 'text/plain')
pos = [ pos = [
float(self.get_body_argument(k)) for k in ['lon', 'lat', 'hgt'] float(self.get_body_argument(k)) for k in ['lat', 'lon', 'hgt']
] ]
data = struct.pack('ddd', *pos) data = struct.pack('ddd', *pos)
sock.sendto(data, (HOST, PORT)) sock.sendto(data, (HOST, PORT))