Unrud
7831ba3e37
Improve variable names
2021-12-20 21:18:32 +01:00
Unrud
8008b36f22
Fix exceptions raised by decode_request
2020-09-14 21:31:00 +02:00
Unrud
6f3a95245f
Extract read*_request_body methods
2020-09-14 21:31:00 +02:00
Unrud
5aef41e691
Rename _write_xml_content to _xml_response
2020-09-14 21:31:00 +02:00
Unrud
f23b413cef
Add more tests
2020-09-14 21:31:00 +02:00
Tom Hacohen
09b021f33e
Web: add support for the POST HTTP method. ( #1097 )
...
* Web: add support for the POST HTTP method.
This patch adds support for POST in addition to the already supported GET.
This is needed for implementing more complex web modules that also
support configuration modifications and advanced queries.
* Base web: return METHOD_NOT_ALLOWED when method isn't implemenetd.
Co-authored-by: Unrud <Unrud@users.noreply.github.com>
2020-09-14 21:31:00 +02:00
Unrud
2dc7acda17
Respond 405 for unsupported methods instead of server error
2020-09-14 21:31:00 +02:00
Unrud
1cbdda6c87
Try to kill child processes of storage hook
2020-08-31 14:21:44 +02:00
Unrud
5225e9d017
Start storage hook in own process group
...
Prevents terminals from sending SIGINT etc.
2020-08-31 14:21:44 +02:00
Unrud
3a4a7eb3e4
Kill storage hook on error
2020-08-31 14:21:44 +02:00
Unrud
f570bb5738
Exit immediately after cleanup when signal is received
...
Waiting for clients introduces the risk that we exceed some timeout (e.g. from systemd) and get killed instead.
2020-08-31 14:21:44 +02:00
Unrud
e7a5d03dc2
Make shutdown_socket optional
2020-08-31 14:21:44 +02:00
Unrud
f9bd89c92a
Fix internal server on FreeBSD
2020-08-18 23:01:11 +02:00
Unrud
c471ee5603
Fix isort test
...
Was broken by isort>=5
2020-07-23 19:41:37 +02:00
Unrud
bf6bc3ac86
Fix internal server on OpenBSD
...
On OpenBSD closed sockets are handled as exceptional conditions.
Fixes #1062
2020-06-06 21:13:15 +02:00
Unrud
46692548d7
Cosmetics
2020-05-24 13:42:56 +02:00
Unrud
88843770b8
Use 403 response for supported-report and valid-sync-token errors
...
Some clients don't handle 409
2020-05-24 13:42:56 +02:00
Unrud
6a29233737
Cosmetics
2020-05-24 13:42:56 +02:00
Unrud
6746aa97f3
Add tests for conflicting UIDs and overwriting of items
2020-05-24 13:42:56 +02:00
Unrud
f1f3cc5606
Test current-user-principal prop authentication workaround
2020-05-24 13:42:56 +02:00
Unrud
d76e247978
Handle missing IPv6 support by the kernel
...
This is different from disabled IPv6.
Fixes #1050
2020-05-24 13:42:56 +02:00
Unrud
4d08cab382
Shorter web interface title
2020-05-22 16:33:05 +02:00
Unrud
80bf7340f5
Fix XML error messages
...
Fixes #825
2020-05-22 16:33:04 +02:00
Unrud
ada9fa1cce
Remove useless constant
2020-05-19 17:06:26 +02:00
Unrud
6158fb961b
Trim all (ASCII) whitespace characters
2020-05-19 07:03:58 +02:00
Unrud
1f8cb8ed89
Remove unnecessary string trimming
2020-05-19 06:52:01 +02:00
Unrud
d26ee9e7ed
Revert "Use secure RNG for auth delay"
...
This reverts commit 7b79c00ae2
.
2020-05-17 01:43:52 +02:00
Unrud
4d632a97f3
Use secure RNG for UIDs
...
Closes #766
2020-05-15 23:34:31 +02:00
Unrud
630d49b7cf
Fix file permissions in storage folder
...
Closes #1024
2020-05-15 21:54:10 +02:00
Unrud
63e00ca677
Direct creation of files for batch uploads
2020-05-15 21:54:10 +02:00
Unrud
7b79c00ae2
Use secure RNG for auth delay
2020-05-15 21:54:09 +02:00
Unrud
2b60f8ca2a
Don't save password in session storage
2020-05-03 21:00:48 +02:00
Unrud
3c778ef95e
Cosmetics
2020-04-28 21:56:13 +02:00
Unrud
8de3a234c4
Escape all occurrences not only the first
2020-04-28 14:11:35 +02:00
Unrud
7f2d5cea62
New right "i": Only allowing HTTP method GET
2020-04-22 19:20:42 +02:00
Unrud
9bd852ba5e
Remove duplicated code
2020-04-22 19:20:36 +02:00
Unrud
d73a308294
Cosmetics
2020-04-22 19:20:30 +02:00
Unrud
d5f5eeeddf
from_file rights: Replace config parser interpolation
2020-04-22 19:20:24 +02:00
Unrud
aef58bd55c
Minimize accesses to rights backend
2020-04-22 19:20:07 +02:00
Unrud
f6a3a19680
Simplify Rights plugin interface
2020-04-09 22:02:03 +02:00
Unrud
8ca01a4989
Fix integrated server on android
2020-04-09 22:01:55 +02:00
Unrud
9c622b57d5
Allow callable in configuration for plugin.type
...
Example:
```python3
\# Load default configuration
my_config = config.load()
\# Pass a class directly
my_config.update({"auth": {"type": MyAuth}})
\# Pass an object directly
my_rights = MyRights()
my_config.update({"rights": {"type": lambda config: my_rights}})
app = Application(my_config)
````
2020-04-09 22:01:35 +02:00
Unrud
bd71c04973
Use correct delimiter
2020-02-20 18:29:08 +01:00
Unrud
f46a3e3d24
Fix test on MacOS (3)
2020-02-20 11:27:26 +01:00
Unrud
ee984b49d4
Fix test on MacOS (2)
2020-02-20 10:55:00 +01:00
Unrud
363dd79833
Fix test on MacOS
2020-02-20 10:42:50 +01:00
Unrud
d3b632e123
Remove unused code
2020-02-20 10:41:33 +01:00
Unrud
8890a4c030
Handle disabled IPv6 support and workaround for PyPy
2020-02-20 07:57:39 +01:00
Unrud
9603aa3496
Tests: Replace gunicorn with waitress (works on Windows too)
2020-02-20 07:57:39 +01:00
Unrud
941bb157cc
Cosmetic changes
2020-02-19 10:01:39 +01:00