Add Content-Length header

This commit is contained in:
Sébastien Chopin 2016-11-25 17:57:59 +01:00
parent 74951a7e40
commit 65de0934f6

View File

@ -132,6 +132,7 @@ class Nuxt {
res.statusCode = context.nuxt.error.statusCode || 500 res.statusCode = context.nuxt.error.statusCode || 500
} }
res.setHeader('Content-Type', 'text/html; charset=utf-8') res.setHeader('Content-Type', 'text/html; charset=utf-8')
res.setHeader('Content-Length', Buffer.byteLength(html))
res.end(html, 'utf8') res.end(html, 'utf8')
}) })
.catch((err) => { .catch((err) => {