aboutsummaryrefslogtreecommitdiff
path: root/src/net/lua.c
diff options
context:
space:
mode:
authorame <[email protected]>2025-06-12 13:57:51 -0500
committerame <[email protected]>2025-06-12 13:57:51 -0500
commitfe09d3576ada9918f55431298c5d9a099e690761 (patch)
tree32fc93c956154a0cdc6a760f3acca1263d4feb2a /src/net/lua.c
parent8e7257aac8b30aaa57577770fd636e784361e35d (diff)
rewrite mimetype parsing
Diffstat (limited to 'src/net/lua.c')
-rw-r--r--src/net/lua.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/lua.c b/src/net/lua.c
index d60c018..ba9a204 100644
--- a/src/net/lua.c
+++ b/src/net/lua.c
@@ -229,7 +229,7 @@ int l_sendfile(lua_State* L){
}
char* ext = strrchr(path, '.');
- if(ext){
+ if(ext && mime_type != NULL){
char* content_type = map_get(mime_type, ext + 1);
if(content_type)