diff --git a/windows/src/developer/TIKE/http/Keyman.Developer.System.HttpServer.Base.pas b/windows/src/developer/TIKE/http/Keyman.Developer.System.HttpServer.Base.pas index 692fba5fc5..3fa77fa3c7 100644 --- a/windows/src/developer/TIKE/http/Keyman.Developer.System.HttpServer.Base.pas +++ b/windows/src/developer/TIKE/http/Keyman.Developer.System.HttpServer.Base.pas @@ -58,7 +58,11 @@ begin Exit; end; - AResponseInfo.ContentType := AResponseInfo.HTTPServer.MIMETable.GetFileMIMEType(AFileName); + if AResponseInfo.ContentType = '' then + begin + AResponseInfo.HTTPServer.MIMETable.LoadTypesFromOS := False; + AResponseInfo.ContentType := AResponseInfo.HTTPServer.MIMETable.GetFileMIMEType(AFileName); + end; AResponseInfo.CharSet := 'UTF-8'; AResponseInfo.ContentLength := FileSizeByName(AFileName); //AResponseInfo.LastModified := GetFileDate(doc); diff --git a/windows/src/developer/TIKE/http/Keyman.Developer.System.HttpServer.Debugger.pas b/windows/src/developer/TIKE/http/Keyman.Developer.System.HttpServer.Debugger.pas index 9ad35f5bc5..fbdc2ba16b 100644 --- a/windows/src/developer/TIKE/http/Keyman.Developer.System.HttpServer.Debugger.pas +++ b/windows/src/developer/TIKE/http/Keyman.Developer.System.HttpServer.Debugger.pas @@ -652,6 +652,7 @@ begin Delete(doc, 1, 6); // Models always expire immediately + AResponseInfo.ContentType := 'application/javascript'; AResponseInfo.Expires := EncodeDate(1990, 1, 1); // I4037 AResponseInfo.CacheControl := 'no-cache, no-store'; // I4037 AResponseInfo.LastModified := Now; // I4037 @@ -686,7 +687,11 @@ begin // Serve the file - AResponseInfo.ContentType := AResponseInfo.HTTPServer.MIMETable.GetFileMIMEType(doc); + if AResponseInfo.ContentType = '' then + begin + AResponseInfo.HTTPServer.MIMETable.LoadTypesFromOS := False; + AResponseInfo.ContentType := AResponseInfo.HTTPServer.MIMETable.GetFileMIMEType(doc); + end; AResponseInfo.CharSet := 'UTF-8'; AResponseInfo.ContentLength := FileSizeByName(doc); //AResponseInfo.LastModified := GetFileDate(doc);