Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[http] Remove exceptions from HTTP/1 codec callbacks (envoyproxy#11101)
Commit Message: Remove exceptions from HTTP/1 codec callbacks. Replaces with http_parser exit codes that indicate failure. codec_status_ propagates the error. Additional Description: I know the diff is slightly messy but the principles I abided by were: Replace throw with setting codec_status_, immediately return and propagate return up to callback with an error exit code, always ASSERT(dispatching_) in the body of the method that throws, always ASSERT(codec_status_.ok()) before setting the codec status. The remaining exception is in encodeHeaders, which I will need to replace with ENVOY_BUG I audited for throws in the includes for this file and did not find anything used in the codec_impl, but I will need to do another pass. This is just part 1 of my HTTP/1 PRs. Part 2 is exception to error handling for encodeHeaders and any other utility functions. This is just a PR to stage. Testing: Tests pass, codec_impl_fuzz_test has been running for a few minutes. Risk level: Medium, this should do nothing but is a codec behavior change. Issues: envoyproxy#10878 Signed-off-by: Asra Ali [email protected]
- Loading branch information