Commit graph

11 commits

Author SHA1 Message Date
346f01c9d9
Add for file iterator check access to file
- Rename function fileiter to file_iterator;

Fix:
 - BrokenPipeError for thread;
 - Log strings;
2024-10-09 14:31:57 +03:00
eabd85f68b
Support keep alive
Improvements:
  - Response return Content-Length header;
  - HTTP handler run recursive after call;
  - File iterator when call before yield file size.
2024-10-08 13:54:15 +03:00
0fb84420fe
Add assert to server_handler into init_server_socket function 2024-10-05 18:15:43 +03:00
440fe803d2 Split TCP socket server and HTTP handler.
- File reader function small improvent;
 - Move MAX_REQUEST_LINE_SIZE to common server file.
2024-10-03 14:50:42 +03:00
c9154cdb08 Code review
Change name from start_http_server() to init_server_socket().

Improvements:
 - Change child threads to daemon type;
 - Send client HTTP error codes & add new HTTP codes description;
 - Change log output format;
 - Add some debug log strings;

Remove:
 - Startup ASCII logo;
2024-10-03 14:26:15 +03:00
9155cb17ed Receive data from client
Allow handle client requests with HTTP body for custom functions.

- Rewrited "path" function to class;
- Simple check clien request of method allowed;
- Use "Enumirations" for handler types, HTTP methods;
2024-09-15 15:11:51 +03:00
c7413887cc Merge master with dev 2024-07-03 14:15:22 +03:00
a4f7411e10 Add more debug messages
- Move log initialization to config file;
- Add meta tag for charset to index file.
2024-07-03 14:06:19 +03:00
7697b7463e Write log files to directory
Move index file to parent directory, remove template directory
2024-06-04 17:25:11 +03:00
f7d2a675fb Add handle & send data of user defined functions
Add
- handle GET request
- handle & send data of user defined functions
- project logotype to log when start server :)

Change
- move set log level to config file
- move Response class to file

Fix
- log message of small or long first request line

Template
- for URL redirection (http_addr -> new_http_addr)
2024-02-26 02:35:24 +03:00
887e8da01b Add functional to send static files
Add
- internal project file iterator function
- path function to locate user files (first allocate as static-files)
- primitive HTML page files for demonstrate server functional

Change
- Response class as iterator
- code for send response to client
2024-02-25 01:42:17 +03:00
Renamed from __main__.py (Browse further)