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
Peter Bieringer
b9ec1c223f
log on_notice_condition: implementation
2026-05-12 08:35:28 +02:00
Max Berger
5b43c9e5bd
Move CSP to config
2026-03-20 08:21:51 +01:00
Max Berger
99e9b7ec56
Add CSP to local web UI forbidding JavaScript eval()
2026-03-18 21:05:01 +01:00
Peter Bieringer
4c3037b4ac
logging/limit_content: use
2026-03-14 15:12:46 +01:00
Peter Bieringer
42e5f10d7d
extend copyright
2026-02-22 16:19:18 +01:00
Peter Bieringer
9135ce69c0
add bad_request function with extended information
2026-02-22 16:18:45 +01:00
Peter Bieringer
7e1890d630
request log: add checksum on debug level, call expensive debug only on debug level
2025-12-28 08:09:35 +01:00
Peter Bieringer
64f5e58549
add support for logging XML request conditionally for profiling
2025-12-10 18:09:04 +01:00
Peter Bieringer
183e556144
Adjust: [logging] header/content debug log indended by space to be skipped by logwatch
2025-12-10 18:01:14 +01:00
Peter Bieringer
76281ad1ff
tox fixes
2025-03-06 08:52:54 +01:00
Peter Bieringer
1d0ff9e84a
tox fix
2025-03-06 08:51:56 +01:00
Peter Bieringer
2ae1762daa
Infcloud: on-the-fly link activation (if available) and default content adjustment
2025-03-06 08:22:34 +01:00
Peter Bieringer
77f69f2b1e
add new error code
2025-02-11 16:42:45 +01:00
Peter Bieringer
b011fa4e61
extend copyright year
2025-02-11 16:42:45 +01:00
Peter Bieringer
d9e15dd7c6
fix for https://github.com/Kozea/Radicale/issues/1516
2024-12-06 06:13:50 +01:00
Peter Bieringer
39662fc680
fix config section info
2024-08-28 07:48:45 +02:00
Peter Bieringer
defa767c8a
add suppress log messages
2024-06-18 08:24:25 +02:00
Peter Bieringer
d83885d108
extend copyright
2024-06-18 08:24:04 +02:00
Peter Bieringer
02019e73e6
conditional debug log of request header+content / response content
2024-06-11 13:26:21 +02:00
Unrud
2b8f4b9419
Replace pkg_resources with importlib for Python >= 3.9
...
Fixes #1184
2022-04-04 18:18:50 +02:00
Unrud
33fcda7c32
Extract httputils.serve_folder
2022-01-18 18:20:16 +01:00
Unrud
d1532aa466
Extract httputils.redirect
2022-01-18 18:20:15 +01:00
Unrud
bbaf0ebd8c
Change name in file header
2021-12-09 16:55:46 +01:00
Unrud
cecb17df03
More type hints
2021-09-26 22:24:45 +02:00
Unrud
a3ca887a37
Fix exceptions raised by decode_request
2020-09-14 21:20:39 +02:00
Unrud
0ce90d6b34
Extract read*_request_body methods
2020-09-14 21:19:48 +02:00
Unrud
8740357eb2
Remove useless constant
2020-05-19 17:04:40 +02:00
Unrud
88a0af8ba1
Improve documentation
2020-01-12 23:32:28 +01: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
8869b34470
refactor
2018-08-28 16:19:43 +02:00