• Home
  • Raw
  • Download

Lines Matching refs:server

39 from http.server import HTTPServer, BaseHTTPRequestHandler
247 def add_standard_headers(server): argument
248 server.send_header('Cache-Control', 'no-cache, no-store, must-revalidate')
249 server.send_header('Access-Control-Allow-Origin', '*')
250 server.send_header('Access-Control-Allow-Methods', 'POST, GET, OPTIONS')
251 server.send_header('Access-Control-Allow-Headers',
253 server.send_header('Access-Control-Expose-Headers',
255 server.send_header(WINSCOPE_VERSION_HEADER, VERSION)
256 server.end_headers()
263 def process(self, server, path): argument
360 def process(self, server, path): argument
368 server.respond(HTTPStatus.OK, j.encode("utf-8"), "text/json")
372 def process(self, server, path): argument
374 self.process_with_device(server, path[1:], path[0])
379 def process_with_device(self, server, path, device_id): argument
382 def get_request(self, server) -> str: argument
384 length = int(server.headers["Content-Length"])
389 return json.loads(server.rfile.read(length).decode("utf-8"))
393 def process_with_device(self, server, path, device_id): argument
426 server.respond(HTTPStatus.OK, j.encode("utf-8"), "text/json")
536 def process_with_device(self, server, path, device_id): argument
538 requested_types = self.get_request(server)
544 server.respond(HTTPStatus.OK, b'', "text/plain")
557 server.respond(HTTPStatus.OK, b'', "text/plain")
561 def process_with_device(self, server, path, device_id): argument
573 server.respond(HTTPStatus.OK, out, "text/plain")
582 def process_with_device(self, server, path, device_id): argument
584 requested_configs = self.get_request(server)
609 server.respond(HTTPStatus.OK, b'', "text/plain")
613 def process_with_device(self, server, path, device_id): argument
617 server.respond(HTTPStatus.OK, str(
622 def process_with_device(self, server, path, device_id): argument
624 requested_types = self.get_request(server)
645 server.respond(HTTPStatus.OK, b'', "text/plain")
649 def __init__(self, request, client_address, server): argument
662 super().__init__(request, client_address, server)