"Continue" response can interleave with response data
- Dominant language
- Rust
- Stars
- 166
- Forks
- 49
- PR merge metrics
- No merged PRs in 30d
Description
Example:
- Client sends "Expect" header
- Server begins writing response
- Server reads from request body for the first time
- Background task sends "100 Continue" response in the middle of a half-written response
There are few possible solutions:
1) Make it an error to read from the request body after starting to write a response. This is not great because eg. an echo server might want to stream data back without buffering it in memory.
2) Send "100 Continue" before either a read from the request body, *or* when starting to write the response. Only omit it if the server explicitly drops the request body before beginning to send a response.
3) Some other way of having the server make an explicit choice of whether the client should continue sending the body.
Contributor guide
Assessment
This issue has not been assessed yet.