Verify unreachable code block in BalsaFrame::ProcessHeaderLines. - Add `QUICHE_CODE_COUNT` to test reachability of the block handling chunked transfer encoding when Content-Length is present. - Add assertion in `BothTransferEncodingAndContentLengthAllowed` unit test to prove Content-Length is NOT cleared, validating that the block is unreachable in standard flows. PiperOrigin-RevId: 967324169
diff --git a/quiche/balsa/balsa_frame.cc b/quiche/balsa/balsa_frame.cc index 747711b..af17add 100644 --- a/quiche/balsa/balsa_frame.cc +++ b/quiche/balsa/balsa_frame.cc
@@ -899,6 +899,10 @@ } if (headers->transfer_encoding_is_chunked_) { + // Verify this code block is never reached as + // headers->transfer_encoding_is_chunked_ is supposed to be false before + // the call to ProcessTransferEncodingLine. + QUICHE_CODE_COUNT(chunked_transfer_encoding_detected); headers->content_length_ = 0; headers->content_length_status_ = BalsaHeadersEnums::NO_CONTENT_LENGTH; content_length_remaining_ = 0;