Skip to content

Commit

Permalink
fixed mime types after #242
Browse files Browse the repository at this point in the history
  • Loading branch information
Arnaud Bouchez committed Mar 1, 2024
1 parent c53dbd9 commit 39ddb83
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
12 changes: 6 additions & 6 deletions src/core/mormot.core.buffers.pas
Original file line number Diff line number Diff line change
Expand Up @@ -1737,9 +1737,9 @@ function IncludeTrailingUriDelimiter(const URI: RawByteString): RawByteString;
'application/vnd.ms-excel', // mtXls
HTML_CONTENT_TYPE, // mtHtml
'text/css', // mtCss
'application/javascript', // mtJS
'text/javascript', // mtJS RFC 9239
'image/x-icon', // mtXIcon
'text/font-woff', // mtFont
'font/woff', // mtFont RFC 8081
TEXT_CONTENT_TYPE, // mtText
'image/svg+xml', // mtSvg
XML_CONTENT_TYPE, // mtXml
Expand Down Expand Up @@ -8691,10 +8691,10 @@ function GetMimeContentTypeFromBuffer(Content: Pointer; Len: PtrInt;
MIME_EXT_TYPE: array[0 .. high(MIME_EXT) - 1] of TMimeType = (
mtPng, mtGif, mtTiff, mtJpg, mtBmp, mtDoc, mtHtml, mtCss,
mtJson, mtXIcon, mtFont, mtText, mtSvg, mtXml, mtXml, mtXml,
mtWebp, mtManifest, mtManifest, mtXml, mtJS, mtJS, mtFont,
mtOgg, mtOgg, mtMp4, mtMp2, mtMp2, mtMpeg, mtH264, mtText,
mtText, mtGzip, mtWebm, mtWebm, mtRar, mt7z, mtBz2, mtWma,
mtWmv, mtAvi, mtPpt, mtXls, mtPdf, mtSQlite3, mtSQlite3);
mtWebp, mtManifest, mtManifest, mtXml, mtJS, mtJS, mtFont, mtOgg,
mtOgg, mtMp4, mtMp2, mtMp2, mtMpeg, mtH264, mtText, mtText,
mtGzip, mtWebm, mtWebm, mtRar, mt7z, mtBz2, mtWma, mtWmv,
mtAvi, mtPpt, mtXls, mtPdf, mtSQlite3, mtSQlite3);

function GetMimeTypeFromExt(const Ext: RawUtf8): TMimeType;
var
Expand Down
2 changes: 1 addition & 1 deletion src/mormot.commit.inc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
'2.2.7186'
'2.2.7190'
2 changes: 1 addition & 1 deletion test/test.core.base.pas
Original file line number Diff line number Diff line change
Expand Up @@ -6496,7 +6496,7 @@ procedure TTestCoreBase.MimeTypes;
'html', HTML_CONTENT_TYPE,
'HTML', HTML_CONTENT_TYPE,
'css', 'text/css',
'js', 'application/javascript',
'js', 'text/javascript',
'ico', 'image/x-icon',
'pdf', 'application/pdf',
'PDF', 'application/pdf',
Expand Down
2 changes: 1 addition & 1 deletion test/test.soa.core.pas
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ function TServiceCalculator.RepeatJsonArray(
function TServiceCalculator.RepeatTextArray(
const item: RawUtf8; count: integer): RawUtf8;
var
buf: array[word] of byte;
buf: array[word] of byte; // 64KB temp buffer
begin
with TJsonWriter.CreateOwnedStream(@buf, SizeOf(buf)) do
try
Expand Down

0 comments on commit 39ddb83

Please sign in to comment.