request.raw.res.end() method is called twice
https://nodejs.org/api/http.html#http_response_end_data_encoding_callback
I think the problem comes from here
https://github.com/hapijs/hapi/blob/master/lib/transmit.js#L295
I test with :
server.ext('onRequest', function (request, reply) {
const res = request.raw.res
const func = res.end
res.end = function (data, encoding) {
console.log('method is called twice')
func.call(res, data, encoding)
}
reply.continue()
});
request.raw.res.end() method is called twice
https://nodejs.org/api/http.html#http_response_end_data_encoding_callback
I think the problem comes from here
https://github.com/hapijs/hapi/blob/master/lib/transmit.js#L295
I test with :