Commit graph

66 commits

Author SHA1 Message Date
michalpokusa
e3c83b4276 Added returns to Server.pool() 2023-07-04 19:21:58 +00:00
michalpokusa
a56a507374 Changes to some Server docstrings 2023-06-08 23:26:43 +00:00
michalpokusa
f62899ca71 Added Server.headers and updated docs for it 2023-05-27 09:00:54 +00:00
michalpokusa
06dcf7abe2 Updated docstrings of authentication related functions 2023-05-26 01:17:23 +00:00
michalpokusa
4ad7995386 Added warning about exposing files and some docstrings 2023-05-22 15:24:27 +00:00
michalpokusa
85b452b95b Fix: Incorrect parsing of default route methods 2023-05-22 14:52:01 +00:00
michalpokusa
90ce5368b4 Minor refactor of sending response, modified guard 2023-05-08 22:41:33 +00:00
michalpokusa
f95781a050 Rewrite of Response logic from context managers to returns, added some new types of response 2023-05-08 09:01:12 +00:00
michalpokusa
e3529d6e37 Moved debugging exception to .poll() 2023-05-07 21:37:00 +00:00
michalpokusa
55be729bfa Fix: Incorrectly changing from list to set using brackets 2023-05-05 22:03:18 +00:00
michalpokusa
a424d27098 Added ... and .... wildcards 2023-05-03 13:53:30 +00:00
michalpokusa
191e91c928 Changed format of debug logs, added Response.size, fix in send_chunk 2023-05-03 09:25:06 +00:00
michalpokusa
33d6b25c5e Refactor of _Route and _Routes, added append_slash 2023-05-03 09:25:06 +00:00
michalpokusa
a5be235a96 Added stopping server on Ctrl-C and debug message on stop 2023-05-01 00:47:00 +00:00
michalpokusa
dbdbacd7f4 Added Server.debug for verbose messages during development 2023-04-30 23:26:49 +00:00
michalpokusa
0607776e7a Added host and port attributes to Server 2023-04-30 21:05:59 +00:00
michalpokusa
e1d3e3b820 Added method for verifying that server can be started on given host:port 2023-04-30 21:03:24 +00:00
michalpokusa
752dcaf343 Returning from serve_forever on KeyboardInterrupt 2023-04-30 11:18:42 +00:00
michalpokusa
07782b68e7 Removed accidentally commited leftover 2023-04-29 13:34:37 +00:00
michalpokusa
eba7a91146 Added Server.stop 2023-04-29 00:02:04 +00:00
michalpokusa
19148a5d1e Extensive updates and expansion of docs and examples 2023-04-28 12:23:54 +00:00
michalpokusa
15b00cb1ba Added server parameter to Request 2023-04-28 11:06:27 +00:00
michalpokusa
85254e5b92 Changes to docstrings 2023-04-27 20:40:23 +00:00
michalpokusa
e5ddaaf0d7 Refactor of .poll and .server_forever, added option to disable filesystem access 2023-04-26 23:57:34 +00:00
michalpokusa
142c89ba6a Added option to restrict access to whole Server with Authentication 2023-04-26 23:46:43 +00:00
michalpokusa
33fecc9827 Allowed passing multiple methods at the same time to .route 2023-04-25 21:27:12 +00:00
michalpokusa
4224ac87c4 Replaced CommonHTTPStatus with direct values 2023-04-25 21:27:12 +00:00
michalpokusa
d4a8a8dc3f Removed HTTP... prefix from class names 2023-04-25 21:27:10 +00:00
michalpokusa
75ac0f2b49 Added authentication logic, AuthenticationError, UNAUTHORIZED_401 status 2023-04-25 21:26:15 +00:00
foamyguy
0850abad7b
Merge pull request #45 from foxy82/main
Fix infinite loop when requesting too quickly
2023-04-24 09:35:39 -05:00
michalpokusa
394c6f3952 Merge commit 'a8b68f153b72b8c022eceec254abe129cf5f5802' into prevent-parent-directory-access 2023-04-19 17:10:38 +00:00
michalpokusa
0467a276e2 Updated HTTPServer constructors to use "/static" as root path 2023-04-16 09:32:21 +00:00
michalpokusa
d89e66e78e Added checking for .. and backslash in path, introduced custom exceptions 2023-04-16 09:31:28 +00:00
michalpokusa
e7a2debc67 Minor changes in comments 2023-04-14 02:53:09 +00:00
michalpokusa
77bc821c38 Moved root_path from start and server_forever methods to constructor 2023-04-13 23:23:13 +00:00
Neradoc
9ea26651f8 allow HEAD requests to files paths 2023-04-13 18:32:31 +02:00
foxy82
1649a45700
Update server.py
Ensure unexpected OSError isn't swallowed.
2023-04-03 12:31:00 +01:00
michalpokusa
cf6903599f Removed old deprecation error 2023-03-20 03:11:05 +00:00
michalpokusa
78cfa0e022 Updated examples and added new ones hat present added functionality 2023-03-19 15:49:21 +00:00
michalpokusa
c95290f390 Replaced route_handlers dict with _HTTPRoutes object in HTTPServer 2023-03-19 15:07:44 +00:00
foamyguy
874d3ed886
Merge pull request #37 from matemaciek/main
Buffer_size improvements
2023-02-06 15:32:32 -06:00
Maciej Sokołowski
9808f15e2e
Auto-serve index.html for root path 2023-01-20 14:51:10 +01:00
Maciej Sokołowski
4e63771c3b
Expose buffer_size in response.send_file, adjust default to match the one in server 2023-01-20 09:57:19 +01:00
michalpokusa
c609a821d5 Changed address to client_address to match CPython's http.server module naming 2023-01-02 17:22:53 +00:00
michalpokusa
c758e519c0 Changed root to root_path in docstrings 2022-12-28 17:44:05 +00:00
michalpokusa
f0b61a721f Prevented from calling .send() multiple times and added deprecation error if handler returns HTTPResponse 2022-12-26 01:52:39 +00:00
michalpokusa
00d3247825 Refactor for unifying the HTTPResponse API 2022-12-23 11:55:57 +00:00
michalpokusa
c1d2f55c46 Merge remote-tracking branch 'origin/main' into test 2022-12-23 11:54:37 +00:00
michalpokusa
d547c7fa39 Fixed and extended docstrings 2022-12-19 20:24:31 +00:00
paul-1
4768bbd20a Add Chunked Encoding to minimize memory usage for
large dynamic html pages.
2022-12-14 20:00:41 -05:00