diff --git a/SimpleHttpServer/HttpServer.cs b/SimpleHttpServer/HttpServer.cs index 4900784..eff0d0b 100644 --- a/SimpleHttpServer/HttpServer.cs +++ b/SimpleHttpServer/HttpServer.cs @@ -263,6 +263,9 @@ public sealed class HttpServer { if (File.Exists(staticResponsePath)) { rc.SetStatusCode(HttpStatusCode.OK); + if (staticResponsePath.EndsWith(".svg")) { + rc.ListenerContext.Response.AddHeader("Content-Type", "image/svg+xml"); + } using var f = File.OpenRead(staticResponsePath); await f.CopyToAsync(rc.ListenerContext.Response.OutputStream); } else {