aboutsummaryrefslogtreecommitdiff
path: root/mime.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2022-04-08 15:25:50 +0000
committerOmar Polo <op@omarpolo.com>2022-04-08 15:25:50 +0000
commit8fb0df4d79c26e54d57fd0d4e35bc1ae2954de20 (patch)
tree13beba77482132fea0bd6571e3918b709acd8d12 /mime.c
parent99a95569a4e95e04600690734fef072cbf19b572 (diff)
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.
Diffstat (limited to 'mime.c')
-rw-r--r--mime.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/mime.c b/mime.c
index 8ce73fd..fc8d8cc 100644
--- a/mime.c
+++ b/mime.c
@@ -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;
}