This commit is contained in:
2017-08-22 21:57:11 +08:00 committed by Pooya Parsa
parent 88f98fb61d
commit 32c6d39358

View File

@ -315,7 +315,7 @@ export default class Renderer extends Tapable {
const sendResponse = (content, type = 'text/html') => { const sendResponse = (content, type = 'text/html') => {
// Set Headers // Set Headers
res.statusCode = err.statusCode res.statusCode = err.statusCode
res.statusMessage = this.options.debug ? err.message : err.name res.statusMessage = err.name
res.setHeader('Content-Type', type + '; charset=utf-8') res.setHeader('Content-Type', type + '; charset=utf-8')
res.setHeader('Content-Length', Buffer.byteLength(content)) res.setHeader('Content-Length', Buffer.byteLength(content))