Files
Radicale/radicale/tests
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
..
2026-05-12 08:35:28 +02:00
2021-12-09 16:55:46 +01:00
2026-04-28 15:43:51 -05:00
2026-03-26 05:47:42 +01:00
2026-06-08 21:44:33 +02:00