commit 3afe8f2: [Fix] Fix favicon.ico Content-Type header

moisseev moiseev at mezonplus.ru
Sun Oct 9 13:21:03 UTC 2022


Author: moisseev
Date: 2022-10-09 10:44:23 +0300
URL: https://github.com/rspamd/rspamd/commit/3afe8f2ee43e592832960456aff71c4853e8bb30 (refs/pull/4302/head)

[Fix] Fix favicon.ico Content-Type header
Issue: #4301

---
 src/libserver/http/http_router.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/libserver/http/http_router.c b/src/libserver/http/http_router.c
index 9ff1195ad..ae8a0329f 100644
--- a/src/libserver/http/http_router.c
+++ b/src/libserver/http/http_router.c
@@ -28,6 +28,7 @@ enum http_magic_type {
 	HTTP_MAGIC_HTML,
 	HTTP_MAGIC_CSS,
 	HTTP_MAGIC_JS,
+	HTTP_MAGIC_ICO,
 	HTTP_MAGIC_PNG,
 	HTTP_MAGIC_JPG
 };
@@ -40,6 +41,7 @@ static const struct _rspamd_http_magic {
 		[HTTP_MAGIC_HTML] = { "html", "text/html" },
 		[HTTP_MAGIC_CSS] = { "css", "text/css" },
 		[HTTP_MAGIC_JS] = { "js", "application/javascript" },
+		[HTTP_MAGIC_PNG] = { "png", "image/x-icon" },
 		[HTTP_MAGIC_PNG] = { "png", "image/png" },
 		[HTTP_MAGIC_JPG] = { "jpg", "image/jpeg" },
 };
@@ -561,4 +563,4 @@ rspamd_http_router_free (struct rspamd_http_connection_router *router)
 		g_hash_table_unref (router->response_headers);
 		g_free (router);
 	}
-}
\ No newline at end of file
+}


More information about the Commits mailing list