about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorUltraQbik <no1skill@yandex.ru>2024-08-26 04:06:47 +0300
committerUltraQbik <no1skill@yandex.ru>2024-08-26 04:06:47 +0300
commitf58af3cb3a3e826d21fd521fe5a55b993d8a348e (patch)
tree66c0816c18660e78f6acc5609cc5fdcff4225940 /src
parent65b85f409fef3c9fe45fe9184d446848ba3f1787 (diff)
downloadhttpy-f58af3cb3a3e826d21fd521fe5a55b993d8a348e.tar.gz
httpy-f58af3cb3a3e826d21fd521fe5a55b993d8a348e.zip
Fix major issue with threading and potential bugs
Thread list was not cleared, so it was accumulating a ton of dead threads, now it should be fixed, as each thread removes itself at the end of request

Added limit to how much data the client can send, as currently client data streams are unsupported

Do minor renaming and allow to switch between HTTP and HTTPs
Diffstat (limited to 'src')
-rw-r--r--src/config.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/config.py b/src/config.py
index eefe1ad..18c136b 100644
--- a/src/config.py
+++ b/src/config.py
@@ -1,6 +1,8 @@
 # generic
-BUFFER_LENGTH = 65536
+BUFFER_LENGTH = 65536           # 64 KiB
+BUFFER_MAX_SIZE = 2**30 * 0.5   # 512 MiB
+CLIENT_MAX_AMOUNT = 64
 
 # API
-API_FILE_RANDOM_MIN_SIZE_LIMIT = 1
-API_FILE_RANDOM_MAX_SIZE_LIMIT = 2**30 * 5
+API_FILE_RANDOM_MIN_SIZE_LIMIT = 1              # 1 byte
+API_FILE_RANDOM_MAX_SIZE_LIMIT = 2**30 * 5      # 5 GiB