-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
OutgoingMessage should not allow writing more bytes than Content-Length #39041
Comments
@nodejs/http wdyt? |
I'm in favor if this is not costing much too much throughput. I think we should add a new option to enable the check (as a minor), and then make a breaking change to flip that default. |
Looks like an interesting ticket, good luck with it @betochf 👍 Please do let me know though in case if I can take over 🙈 |
@betochf Are you still on it? |
May I start working on this issue? As I think I would be able to create a PR for the same. |
@ronag may please help me with a specific test case which I can add as a test and also I can use that to test my changes. |
if this will be a perf drop, what about a config flag for strict validation? there are very specific conditions when to send this header. If we consider request payloads "inputs" its the receiving system that should validated those 🤔 |
Hi everyone !!!!! |
Hey everyone, |
Hey @ronag is this issue still available for someone to take? I noticed some previously closed PRs due to some broken tests. Can I take this one and get this resolved? |
Go for it! |
I don't think we currently error if the user specifices a content-length header and then writes more bytes to the response. I think this is something we could detect and error. Some http clients have a hard time handling this case (especially with pipelining) and would be nice if we could help with reducing the probability of this occuring.
The text was updated successfully, but these errors were encountered: