Skip to content

Commit

Permalink
can't set custom headers after writeHead
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeed committed May 19, 2018
1 parent d052962 commit 72a8b8c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/sirv/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ module.exports = function (dir, opts={}) {
let data = find(pathname, extensions);
if (!data) return next ? next() : notFound(res);

res.writeHead(200, data.headers);
setHeaders(res, pathname, data.stats);
res.writeHead(200, data.headers);

fs.createReadStream(data.abs).pipe(res);
}
Expand Down

0 comments on commit 72a8b8c

Please sign in to comment.