Skip to content

Commit

Permalink
fix(sirv): regression with --single in dev mode
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeed committed May 9, 2019
1 parent aff045d commit c73fd13
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/sirv/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,13 @@ module.exports = function (dir, opts={}) {
stats = fs.statSync(file);
if (stats.isDirectory()) continue;
setHeaders(res, uri, stats);
send(req, res, file, stats, {
return send(req, res, file, stats, {
'Content-Type': mime.getType(file),
'Last-Modified': stats.mtime.toUTCString(),
'Content-Length': stats.size,
});
}
return next ? next() : isNotFound(req, res);
}
}

Expand Down

0 comments on commit c73fd13

Please sign in to comment.