2fd62996ec
Enable SO_REUSEADDR whenever it's available
...
This is a minimal change compared to #84 .
Closes #83
2024-02-21 18:49:34 -06:00
Dan Halbert
d8f9a72d3e
Merge pull request #82 from jepler/fix-failed-accept
...
Preserve the real error if accept failed.
2024-02-16 11:14:56 -05:00
303adf874c
Preserve the real error if accept failed.
...
Otherwise, the exception would be about the variable 'conn'
never being assigned a value.
This scenario came up when there was an internal bug in circuitpython
sockets that made accept fail; however, it might be the case that accept
can "normally" fail, e.g., if all sockets are exhausted.
2024-02-16 09:58:49 -06:00
michalpokusa
8b7d79e322
Changed comment to docstring
2024-02-07 07:08:03 +00:00
michalpokusa
8a4c067e49
Fix: AttributeError on CircuitPython
2024-02-07 06:57:39 +00:00
michalpokusa
6944481170
Added reuse behaviour for CPython
2024-02-01 15:45:13 +00:00
michalpokusa
f417d34a0c
Changes to poll_interval in serve_forever
2024-01-28 15:38:25 +00:00
michalpokusa
f03f49eaa0
Changes to docs of Route.matches
2024-01-25 10:25:59 +00:00
michalpokusa
77ec7a6fd8
CI pylint fix
2024-01-25 02:16:06 +00:00
michalpokusa
7be1e7062b
Refactor of parsing path_pattern
2024-01-25 01:49:34 +00:00
michalpokusa
b6664cfe71
Added additional validation to path in Route constructor
2024-01-25 01:49:34 +00:00
michalpokusa
17ea20669a
Refactored _Routes to Server method
2024-01-25 01:49:34 +00:00
michalpokusa
4002f26d88
Moved _receive_request method
2024-01-25 01:49:17 +00:00
michalpokusa
9911f35724
Added alternative adafruit_hashlib import and warning message in neither is present
2023-12-14 20:22:30 +00:00
michalpokusa
3d01ec4a7c
Fix: ? always in debug messages and only first value was displayed
2023-11-06 15:31:03 +00:00
michalpokusa
1be6879fe1
Minor refactor
2023-11-06 14:16:14 +00:00
michalpokusa
00faa249c5
Added query params to debug message after sending response
2023-11-06 14:16:14 +00:00
michalpokusa
af880fc357
Added File.content_bytes
2023-09-02 16:58:07 +00:00
michalpokusa
ccef0a8ba4
Minor change in docstring
2023-09-02 16:45:06 +00:00
michalpokusa
d051ef5345
Made Request.json() available for PUT, PATCH and DELETE requests
2023-09-01 23:07:46 +00:00
michalpokusa
eff94fa9e5
Fix typing in Server.route
2023-09-01 22:41:31 +00:00
michalpokusa
d1f8fdaa8e
Pylint CI fix
2023-09-01 06:55:13 +00:00
michalpokusa
d2e9c58362
Improvements in FormData parsing and Content-Type determining
2023-09-01 06:45:59 +00:00
michalpokusa
f2773cd182
Fix #68 : Incorrect parsing of x-www-from-urlencoded in some cases
2023-09-01 06:41:36 +00:00
michalpokusa
4ec080ec21
Fix #69 : 'None' instead of None in FormData.get()
2023-09-01 05:59:10 +00:00
michalpokusa
dc7bec0106
Added pool_interval parameter to Server.serve_forever
2023-08-31 21:21:21 +00:00
michalpokusa
8c16b279df
Added info abotu adding cookies using Set-Cookie headers
2023-08-29 17:14:20 +00:00
michalpokusa
e671f8ea5a
Added elapsed time to _debug_response_sent
2023-08-28 19:14:17 +00:00
michalpokusa
4ec5f9a3e6
Added cookies handling and example for it
2023-08-28 19:01:16 +00:00
michalpokusa
46c22bfc79
Refactor of Headers, implemented _IFieldStorage interface
2023-08-28 19:01:16 +00:00
michalpokusa
9a790395de
Refactor of QueryParams and FormData, moved interfaces to separate file
2023-08-28 19:01:09 +00:00
michalpokusa
5da48c20aa
Added Token authentication method
2023-08-28 19:01:00 +00:00
michalpokusa
60a472e6cd
Added option to construct Headers from str and refactor of parsing request header part
2023-08-28 12:29:54 +00:00
michalpokusa
6031bece2c
Added Headers.get_directive() and Headers.get_parameter()
...
@to get_parameter
2023-08-28 12:29:31 +00:00
michalpokusa
d743d1c6f3
Minor docstring, typing and encoding fixes
...
temp
to docs
2023-08-27 18:06:35 +00:00
michalpokusa
4ef72f1fd8
Refactor of Redirect response class to allow 301 and 302 codes
2023-08-27 02:26:29 +00:00
michalpokusa
503522c6e4
Added tuple to possible data types of route(methods=...)
2023-08-27 01:56:47 +00:00
foamyguy
be65668ab4
Merge pull request #64 from FoamyGuy/xss_hardening
...
XSS hardening
2023-08-22 17:44:36 -05:00
michalpokusa
5e57a6496a
Fix: Wrong method in example and .json() for non-POST requests
2023-07-31 16:26:41 +00:00
foamyguy
be5c8d1dfc
code format
2023-07-31 09:10:39 -05:00
foamyguy
a55bfe933d
move debug def, rename arg to safe, rename encoding def, use more descriptive encoded value.
2023-07-31 09:10:12 -05:00
michalpokusa
4063b5a39b
Updated Copyright headers
2023-07-30 20:09:30 +00:00
foamyguy
96a6d0e570
fix docstrings
2023-07-30 11:14:28 -05:00
foamyguy
7753ec0f54
pylint fixes
2023-07-30 11:12:24 -05:00
foamyguy
48dca56069
initial hardening
2023-07-30 11:06:37 -05:00
michalpokusa
d3890130ee
Modified as_route docstring to be more verbose
2023-07-21 08:39:20 +00:00
michalpokusa
978a0c9509
Minor change in as_route docstring
2023-07-21 00:02:13 +00:00
michalpokusa
9dfaf80288
Merge remote-tracking branch 'origin/main' into external-routes-websockets-sse
2023-07-18 18:41:40 +00:00
michalpokusa
5c30a2a31b
Added as_route decorator as shorthand for creating Route objects
2023-07-16 18:44:58 +00:00
michalpokusa
e34d27dcbb
Fix: Wrong returns in docstring
2023-07-13 11:47:27 +00:00