about summary refs log tree commit diff
path: root/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'main.py')
-rw-r--r--main.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/main.py b/main.py
index 2bd9c9d..60bb023 100644
--- a/main.py
+++ b/main.py
@@ -166,6 +166,12 @@ class HTTPServer:
             client.setblocking(False)
             request = self._recv_request(client)
             if request is not None:
+                # log request
+                logging.info(f"IP: {client.getpeername()[0]}")
+                for key, val in request.__dict__.items():
+                    logging.info(f"{key}: {val}")
+
+                # handle request
                 self._client_request_handler(client, request)
         except Exception as e:
             logging.warning("ignoring error:", exc_info=e)
@@ -280,7 +286,6 @@ class HTTPServer:
                     return
                 time.sleep(SOCKET_ACK_INTERVAL)
                 timer -= 1
-                print(timer)
             if self.stop_event.is_set() or timer <= 0:
                 return