Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On response header, Transfer-Encoding is always chunked #45

Open
djaoka opened this issue Nov 1, 2018 · 2 comments
Open

On response header, Transfer-Encoding is always chunked #45

djaoka opened this issue Nov 1, 2018 · 2 comments

Comments

@djaoka
Copy link

djaoka commented Nov 1, 2018

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));
@flockonus
Copy link
Contributor

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.

@djaoka
Copy link
Author

djaoka commented Nov 7, 2018

ok i will try to PR. thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants