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.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/main.py b/main.py
index 6f824da..39ae8f3 100644
--- a/main.py
+++ b/main.py
@@ -157,6 +157,8 @@ class HTTPServer:
 
             # break the connection
             break
+
+        # close connection (stop page loading)
         self._close_client(client)
 
     @staticmethod
@@ -172,8 +174,11 @@ class HTTPServer:
             # if it is -> return file from that path
             async with aiofiles.open(PATH_MAP[request.path]["path"], "rb") as f:
                 data = await f.read()
+
+            # send 200 response with the file to the client
             HTTPServer._send(client, 200, data)
         else:
+            # send 400 response to the client
             HTTPServer._send(client, 400)
 
     @staticmethod