Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions test/integration/h2_capture_fuzz.proto
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ message H2FrameMetadata {
Metadata metadata = 3;
}

// A header that contains an arbitrary status
message H2FrameStatus {
bytes status = 1;
uint32 stream_index = 2;
}

message H2TestFrame {
// These values map to the frame creation methods in:
// test/common/http/http2/http2_frame.h
Expand All @@ -151,6 +157,7 @@ message H2TestFrame {
H2FrameRequest request = 13;
H2FramePostRequest post_request = 14;
H2FrameGeneric generic = 15;
H2FrameStatus status = 16;
H2FrameMetadata metadata = 77;
}
}
Expand Down
45 changes: 45 additions & 0 deletions test/integration/h2_corpus/status_test_overflowed_status

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions test/integration/h2_fuzz.cc
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,13 @@ void H2FuzzIntegrationTest::sendFrame(const test::integration::H2TestFrame& prot
Http2Frame::makeMetadataFrameFromMetadataMap(stream_idx, metadata_map, metadata_flags);
break;
}
case test::integration::H2TestFrame::kStatus: {
const std::string status = proto_frame.status().status();
const uint32_t stream_idx = proto_frame.status().stream_index();
ENVOY_LOG_MISC(trace, "Sending status frame");
h2_frame = Http2Frame::makeHeadersFrameWithStatus(status, stream_idx);
break;
}
case test::integration::H2TestFrame::kGeneric: {
const absl::string_view frame_bytes = proto_frame.generic().frame_bytes();
ENVOY_LOG_MISC(trace, "Sending generic frame");
Expand Down