Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Libprocess: Fixed a crash in the presence of request/response trailers.
Prior to this patch, both `StreamingRequest` and `StreamingResponse` decoders made an assumption that the underlying HTTP parser never yields a header after having reported that all headers have been processed, i.e., `on_header_field()` and `on_header_value()` callbacks are never called after `on_headers_complete` has been called. This assumption is incorrect: HTTP parser can yield a header after body for trailers in chunked requests and responses or for malformed messages. This patch relaxes the assumption. Instead of crashing, HTTP message parsing is gracefully aborted and a decoding error is returned. Review: https://reviews.apache.org/r/66090
- Loading branch information
Showing
1 changed file
with
38 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters