bbd47e1427
If charset is unspecified, the encoding falls back to ISO 8859-1 or something else that is defined in HTTP/1.1. Given there is no reason not to use UTF-8 nowadays[0] and one can convert legacy encodings to UTF-8 easily, if the case comes up, it is a sane default to specify it in the config.def.h. [0]: https://utf8everywhere.org/ Signed-off-by: Laslo Hunhold <dev@frign.de>
34 lines
1 KiB
C
34 lines
1 KiB
C
#define HEADER_MAX 4096
|
|
#define FIELD_MAX 200
|
|
|
|
/* mime-types */
|
|
static const struct {
|
|
char *ext;
|
|
char *type;
|
|
} mimes[] = {
|
|
{ "xml", "application/xml; charset=utf-8" },
|
|
{ "xhtml", "application/xhtml+xml; charset=utf-8" },
|
|
{ "html", "text/html; charset=utf-8" },
|
|
{ "htm", "text/html; charset=utf-8" },
|
|
{ "css", "text/css; charset=utf-8" },
|
|
{ "txt", "text/plain; charset=utf-8" },
|
|
{ "md", "text/plain; charset=utf-8" },
|
|
{ "c", "text/plain; charset=utf-8" },
|
|
{ "h", "text/plain; charset=utf-8" },
|
|
{ "gz", "application/x-gtar" },
|
|
{ "tar", "application/tar" },
|
|
{ "pdf", "application/x-pdf" },
|
|
{ "png", "image/png" },
|
|
{ "gif", "image/gif" },
|
|
{ "jpeg", "image/jpg" },
|
|
{ "jpg", "image/jpg" },
|
|
{ "iso", "application/x-iso9660-image" },
|
|
{ "webp", "image/webp" },
|
|
{ "svg", "image/svg+xml; charset=utf-8" },
|
|
{ "flac", "audio/flac" },
|
|
{ "mp3", "audio/mpeg" },
|
|
{ "ogg", "audio/ogg" },
|
|
{ "mp4", "video/mp4" },
|
|
{ "ogv", "video/ogg" },
|
|
{ "webm", "video/webm" },
|
|
};
|