From a6bc1e4b764f018b2ddb9ba7cf24d53fcadaaf85 Mon Sep 17 00:00:00 2001 From: Lauri Kasanen Date: Tue, 30 Jul 2024 13:51:10 +0300 Subject: [PATCH] Set the mimetype of everything under Downloads/ to binary --- common/network/websocket.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/network/websocket.c b/common/network/websocket.c index cdedda4..bd231d2 100644 --- a/common/network/websocket.c +++ b/common/network/websocket.c @@ -783,6 +783,10 @@ static const char *name2mime(const char *name) { goto def; end++; + // Everything under Downloads/ should be treated as binary + if (strcasestr(name, "Downloads/")) + goto def; + #define CMP(s) if (!strncmp(end, s, sizeof(s) - 1)) CMP("htm")