Internal change
PiperOrigin-RevId: 473354194
diff --git a/quiche/quic/core/http/http_decoder.cc b/quiche/quic/core/http/http_decoder.cc
index 2bdce8e..c6be41e 100644
--- a/quiche/quic/core/http/http_decoder.cc
+++ b/quiche/quic/core/http/http_decoder.cc
@@ -670,4 +670,16 @@
}
}
+std::string HttpDecoder::DebugString() const {
+ return absl::StrCat(
+ "HttpDecoder:", "\n state: ", state_, "\n error: ", error_,
+ "\n current_frame_type: ", current_frame_type_,
+ "\n current_length_field_length: ", current_length_field_length_,
+ "\n remaining_length_field_length: ", remaining_length_field_length_,
+ "\n current_frame_length: ", current_frame_length_,
+ "\n remaining_frame_length: ", remaining_frame_length_,
+ "\n current_type_field_length: ", current_type_field_length_,
+ "\n remaining_type_field_length: ", remaining_type_field_length_);
+}
+
} // namespace quic
diff --git a/quiche/quic/core/http/http_decoder.h b/quiche/quic/core/http/http_decoder.h
index ac68276..0e49c3f 100644
--- a/quiche/quic/core/http/http_decoder.h
+++ b/quiche/quic/core/http/http_decoder.h
@@ -146,6 +146,8 @@
// Returns true if input data processed so far ends on a frame boundary.
bool AtFrameBoundary() const { return state_ == STATE_READING_FRAME_TYPE; }
+ std::string DebugString() const;
+
private:
friend test::HttpDecoderPeer;