Add Content-Length header to HTTP response in FilesRouter (#2408)
This commit is contained in:
committed by
Tyler Brock
parent
5865d59b5a
commit
8d8192bbcc
@@ -40,6 +40,7 @@ export class FilesRouter {
|
|||||||
res.status(200);
|
res.status(200);
|
||||||
var contentType = mime.lookup(filename);
|
var contentType = mime.lookup(filename);
|
||||||
res.set('Content-Type', contentType);
|
res.set('Content-Type', contentType);
|
||||||
|
res.set('Content-Length', data.length);
|
||||||
res.end(data);
|
res.end(data);
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
res.status(404);
|
res.status(404);
|
||||||
|
|||||||
Reference in New Issue
Block a user