fix: write HTTP status code message when the second property of res.writeHead isn't an object
This commit is contained in:
parent
fc4b89c6bd
commit
b8d742c983
1 changed files with 1 additions and 1 deletions
|
@ -84,7 +84,7 @@ module.exports = function (req, res, logFacilities, config, next) {
|
||||||
}
|
}
|
||||||
writtenStatusCode = statusCode;
|
writtenStatusCode = statusCode;
|
||||||
res.setHeader("X-SVRJS-Cache", "MISS");
|
res.setHeader("X-SVRJS-Cache", "MISS");
|
||||||
if (headers) {
|
if (headers || typeof statusCodeDescription !== "object") {
|
||||||
originalWriteHead(
|
originalWriteHead(
|
||||||
writtenStatusCode,
|
writtenStatusCode,
|
||||||
statusCodeDescription,
|
statusCodeDescription,
|
||||||
|
|
Loading…
Reference in a new issue