Add Content-Length header to HTTP response in FilesRouter (#2408)

This commit is contained in:
Steven Van Bael
2016-08-04 19:29:10 +02:00
committed by Tyler Brock
parent 5865d59b5a
commit 8d8192bbcc

View File

@@ -40,6 +40,7 @@ export class FilesRouter {
res.status(200);
var contentType = mime.lookup(filename);
res.set('Content-Type', contentType);
res.set('Content-Length', data.length);
res.end(data);
}).catch((err) => {
res.status(404);