Add a body wrapper that validates the returned length against content length #3487
Labels
bug
Something isn't working
client
high-priority
High priority issue
pending-release
production-readiness
Although Hyper attempts to protect against this case, in general it is possible for our HTTP client to return bodies that are shorter (or longer!) than we expect.
In this case, we should return an error to the customer (rather than happily returning obviously wrong data).
This should be handled by wrapping the body in a body wrapper that is constructed based on the content length returned from the server (similar to how checksum wrapping works today).
Unlike checksums, this would always be installed.
The text was updated successfully, but these errors were encountered: