20 Commits

Author SHA1 Message Date
TowyTowy
651e30211c Fix: serve_resource/serve_folder ignore mimetypes and fallback_mimetype parameters
httputils._serve_traversable looked up the Content-Type in the
module-level MIMETYPES/FALLBACK_MIMETYPE constants instead of the
mimetypes/fallback_mimetype parameters that serve_resource() and
serve_folder() accept and pass through. The parameters exist since the
helper was extracted for use by web plugins (33fcda7c, "Extract
httputils.serve_folder"), and the sibling parameters path_prefix and
index_file are honored, but a custom web plugin passing its own
mimetype mapping (e.g. to serve .json, .ico or .mjs files with a
correct Content-Type) silently got the built-in mapping and
application/octet-stream fallback instead.

Use the parameters for the lookup. No behavior change for the built-in
web module, which relies on the defaults.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-18 12:10:37 +02:00
Max Berger
19f9d0a8c7 web ui: New setting for browser-based login
This is useful in cases where OIDC login is active
which would then redirect the user to a central
login page.

See https://github.com/Kozea/Radicale/issues/2143
2026-05-27 19:43:57 +02:00
Unrud
685a91bfe6 web.none: Redirect instead of 404 2022-01-18 18:20:16 +01:00
Unrud
22fc38850c web.internal: Use absolute path for redirect 2022-01-18 18:20:15 +01:00
Unrud
e0adecf30c Tests: Check Location header and body for redirects 2022-01-16 13:09:13 +01:00
Unrud
402bd3580e Tests: Simplify HTTP status check 2022-01-16 13:07:56 +01:00
Unrud
4b5165dc42 Extract method configure 2021-12-10 20:54:04 +01:00
Unrud
bbaf0ebd8c Change name in file header 2021-12-09 16:55:46 +01:00
Unrud
60f25bf19a Type hints for tests 2021-09-26 22:24:45 +02:00
Unrud
80e8750c8a Add more tests 2020-09-14 18:54:02 +02:00
Tom Hacohen
d3bb19800c 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 18:17:45 +02:00
Unrud
180e96b332 Move internal options to other sections 2020-02-19 09:50:36 +01:00
Unrud
5371be2b39 Mark internal configuration options and sections with underscore 2020-02-19 09:50:27 +01:00
Unrud
fc180266d5 Improve tests
- Parse and verify XML responses
- Extract methods for common requests
2020-01-20 09:47:51 +01:00
Unrud
ed72e697de Tests: Use absolute imports 2020-01-15 18:44:00 +01:00
Unrud
caf5ff1080 Change default value for external users 2020-01-12 23:32:26 +01:00
Unrud
b7590f8c84 Rework configuration 2019-06-17 04:18:09 +02:00
Unrud
63e6d091b9 Update copyright 2019-06-17 04:13:24 +02:00
Unrud
5e0a387ed9 remove whitespace before email 2018-09-04 03:33:47 +02:00
Unrud
17127d97a6 Test web plugin 2018-09-04 03:33:42 +02:00