hardcode the mapping text/gemini -> .gmi/.gemini

It's still possible to override this automatic mapping by just adding
an entry like

	application/octet-stream	gemini gmi

in the `types' block.
This commit is contained in:
Omar Polo 2022-04-08 15:25:50 +00:00
parent 99a95569a4
commit 8fb0df4d79
1 changed files with 2 additions and 0 deletions

2
mime.c
View File

@ -149,6 +149,8 @@ mime(struct vhost *host, const char *path)
mime_find);
if (t != NULL)
return t->mime;
if (!strcmp(ext, "gmi") || !strcmp(ext, "gemini"))
return "text/gemini";
return def;
}