Response "Non-implement" to GET endpoint

This commit is contained in:
leafee98 2023-03-31 15:15:25 +08:00
parent f381eb9853
commit 87ca8e3389

View file

@ -137,10 +137,10 @@ class S(BaseHTTPRequestHandler):
self.send_header("Content-Type", "text/plaintext") self.send_header("Content-Type", "text/plaintext")
self.end_headers() self.end_headers()
# def do_GET(self): def do_GET(self):
# logging.info("GET request, Path=%s, Headers: %s", str(self.path), str(self.headers)) logging.info("Received GET request, Path: %s", str(self.path))
# self._set_response() content = "Non-implemented".encode("utf-8")
# self.wfile.write("GET request for {}".format(self.path).encode("utf-8")) self._write_response(403, "text/plaintext", content)
def _write_response(self, status_code: int, content_type: str, content: bytes): def _write_response(self, status_code: int, content_type: str, content: bytes):
self.send_response(status_code) self.send_response(status_code)