diff --git a/Libraries/SPTarkov.Server.Core/Utils/HttpFileUtil.cs b/Libraries/SPTarkov.Server.Core/Utils/HttpFileUtil.cs index f077886d..ee70ed61 100644 --- a/Libraries/SPTarkov.Server.Core/Utils/HttpFileUtil.cs +++ b/Libraries/SPTarkov.Server.Core/Utils/HttpFileUtil.cs @@ -12,7 +12,10 @@ public class HttpFileUtil(HttpServerHelper httpServerHelper) var pathSlice = filePath.Split("/"); var mimePath = httpServerHelper.GetMimeText(pathSlice[^1].Split(".")[^1]); var type = string.IsNullOrWhiteSpace(mimePath) ? httpServerHelper.GetMimeText("txt") : mimePath; + var fileInfo = new FileInfo(filePath); resp.Headers.Append("Content-Type", type); + resp.Headers.Append("Content-Length", fileInfo.Length.ToString()); + await resp.SendFileAsync(filePath, CancellationToken.None); } }