Skip to content

Commit

Permalink
StaticFiles.js fix for unknown file types, v1.0.29
Browse files Browse the repository at this point in the history
  • Loading branch information
piliugin-anton committed Jul 5, 2022
1 parent f6a1203 commit 26581ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "uquik",
"version": "1.0.28",
"version": "1.0.29",
"description": "uQuik HTTP(S) framework",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion src/StaticFiles.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const StaticFiles = (options = {}) => {

try {
const [file, stats] = await resolveFile(req.path === '/' ? path.join(opts.root, opts.indexFile) : path.normalize(path.join(opts.root, req.path)), opts.indexFile)
const mimeType = mimeTypes.lookup(file)
const mimeType = mimeTypes.lookup(file) || 'application/octet-stream'

stats.mtime.setMilliseconds(0)
const timeUTC = stats.mtime.toUTCString()
Expand Down

0 comments on commit 26581ed

Please sign in to comment.