express-interceptor
express-interceptor copied to clipboard
On response header, Transfer-Encoding is always chunked
It's seems that if i use this package, Content-Length
is never set and Transfer-Encoding
is equal to chunked
.
Is it normal ?
My fix : setting the Content-Length juste before calling send
const data = JSON.parse(body);
data.moreInfo = 'tada!';
....
res.set('Content-Length', Buffer.byteLength(JSON.stringify(data), 'utf-8'));
send(JSON.stringify(data));
Hi Johann, if there is something you'd like to PR we can consider the change, but we are not active in this project for the past years.
ok i will try to PR. thx