-
Notifications
You must be signed in to change notification settings - Fork 541
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
Breaking change: deprecate body
on http methods with no defined body semantics
#2357
Comments
To give more context around it: The discussion was going around not allowing to attach bodies to those requests whose doesn't have defined semantics to handle the
It might be good to keep it this way, as anyways it is up to the server to decide what to do in those scenarios. Thoughts? |
dispatch should allow it. fetch should follow the spec. I'm on the fence about request. |
Over a quick search, it seems For |
If Fetch spec isn't explicit, then try to copy Chrome and other browser's behavior. |
The fetch spec has very little to do with http (the rfcs are mentioned as reference points for implementations). We should instead follow either what the rfcs say or what's best for node. |
Then the question remains open: From what I've seen, both browsers ( At much, I believe |
that part is from the fetch spec, which undici implements. I also think undici should stay the same. If anyone feels differently then this issue can be re-opened. |
Agreed - undici can do what it wants HTTP wise if things aren't specified. Fetch should strictly follow spec and browsers. |
Extending discussion from #2305 (comment)
This will be a breaking change:
shouldSendContentLength=false
methods will no longer parse and send any attached bodycontent-length
will be forced to 0 on requestThe text was updated successfully, but these errors were encountered: