-
Notifications
You must be signed in to change notification settings - Fork 91
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
setting content-length #440
Comments
Thanks for reporting! Would you like to send a Pull Request to address this issue? Remember to add unit tests. |
This feature would be a good addition, and it would be even better if we could do it for uncompressed files as well (by using statSync or something) |
Looks like this is not a fastify problem. In my case it must be some other component that's causing the trouble. I noticed that the browser uses http2 requests while I configured fastify to use http1 so there must be a proxy somewhere in the setup doing the conversion. I guess that one drops the content-length header. @gurgunday could that explain why you also observed this problem? |
That's interesting, I don't see the header in my production app either, let me try on localhost and come back on this |
Oh yeah, it's It might indeed be a proxy like Cloudflare that's dropping it too Closing the issue if you don't have any other problems, feel free to comment again otherwise |
Prerequisites
🚀 Feature Proposal
I propose to set content-length when it's available. I'm using the preCompressed option so the size is trivially available. I'm less certain whether it is doable for on-the-fly encoding. Wdyt?
Motivation
No response
Example
No response
The text was updated successfully, but these errors were encountered: