From 4179473d901f7e2e718cf6d3f8939e46db20e61e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20N=C3=A4geli?= Date: Tue, 17 Mar 2020 20:50:04 +0100 Subject: [PATCH] Add support for favicons (closes #61) --- API/GenHTTP.API/Protocol/ContentType.cs | 2 +- .../Websites/WebsiteBuilder.cs | 12 +- .../Websites/WebsiteRouter.cs | 19 ++ .../Providers/WebsiteTests.cs | 305 +++++++++--------- 4 files changed, 189 insertions(+), 149 deletions(-) diff --git a/API/GenHTTP.API/Protocol/ContentType.cs b/API/GenHTTP.API/Protocol/ContentType.cs index 612c8cd2..00677cb6 100644 --- a/API/GenHTTP.API/Protocol/ContentType.cs +++ b/API/GenHTTP.API/Protocol/ContentType.cs @@ -218,7 +218,7 @@ public struct FlexibleContentType { ContentType.TextHtml, "text/html" }, { ContentType.TextCss, "text/css" }, { ContentType.ApplicationJavaScript, "application/javascript" }, - { ContentType.ImageIcon, "image/vnd.microsoft.icon" }, + { ContentType.ImageIcon, "image/x-icon" }, { ContentType.ImageGif, "image/gif" }, { ContentType.ImageJpg, "image/jpg" }, { ContentType.ImagePng, "image/png" }, diff --git a/Modules/GenHTTP.Modules.Core/Websites/WebsiteBuilder.cs b/Modules/GenHTTP.Modules.Core/Websites/WebsiteBuilder.cs index e12117d3..e94fd010 100644 --- a/Modules/GenHTTP.Modules.Core/Websites/WebsiteBuilder.cs +++ b/Modules/GenHTTP.Modules.Core/Websites/WebsiteBuilder.cs @@ -19,6 +19,8 @@ public class WebsiteBuilder : RouterBuilderBase private IBuilder? _Menu; + private IResourceProvider? _Favicon; + private readonly List