parse login data

This commit is contained in:
Jakob Ketterl
2020-02-23 20:52:32 +01:00
parent fa75cac7f5
commit a70c51193b
3 changed files with 26 additions and 4 deletions

View File

@ -20,11 +20,17 @@ class Controller(object):
content = content.encode()
self.handler.wfile.write(content)
def send_redirect(self, location, code=303):
def send_redirect(self, location, code=303, cookies=[]):
self.handler.send_response(code)
self.handler.send_header("Location", location)
self.handler.end_headers()
def get_body(self):
if "Content-Length" not in self.handler.headers:
return None
length = int(self.handler.headers["Content-Length"])
return self.handler.rfile.read(length)
def handle_request(self):
action = "indexAction"
if "action" in self.options: