diff --git a/src/quic/node_quic_stream-inl.h b/src/quic/node_quic_stream-inl.h index 47aa7d5d5b..1f5d68eba5 100644 --- a/src/quic/node_quic_stream-inl.h +++ b/src/quic/node_quic_stream-inl.h @@ -148,6 +148,10 @@ void QuicStream::Unschedule() { stream_queue_.Remove(); } +std::string QuicHeader::ToString() { + return name() + " = " + value(); +} + } // namespace quic } // namespace node diff --git a/src/quic/node_quic_stream.cc b/src/quic/node_quic_stream.cc index ff8d8efa81..aff7484cfc 100644 --- a/src/quic/node_quic_stream.cc +++ b/src/quic/node_quic_stream.cc @@ -16,6 +16,7 @@ #include #include #include +#include namespace node { @@ -101,7 +102,6 @@ void QuicStream::Acknowledge(uint64_t offset, size_t datalen) { // While not all QUIC applications will support headers, QuicStream // includes basic, generic support for storing them. bool QuicStream::AddHeader(std::unique_ptr header) { - Debug(this, "Header Added"); size_t len = header->length(); QuicApplication* app = session()->application(); // We cannot add the header if we've either reached @@ -113,6 +113,7 @@ bool QuicStream::AddHeader(std::unique_ptr header) { } current_headers_length_ += header->length(); + Debug(this, "Header - %s", header->ToString().c_str()); headers_.emplace_back(std::move(header)); return true; } diff --git a/src/quic/node_quic_stream.h b/src/quic/node_quic_stream.h index 11218bc3fc..47e0f078d6 100644 --- a/src/quic/node_quic_stream.h +++ b/src/quic/node_quic_stream.h @@ -83,6 +83,8 @@ class QuicHeader : public MemoryRetainer { // Returns the total length of the header in bytes // (including the name and value) virtual size_t length() const = 0; + + inline std::string ToString(); }; enum QuicStreamStates : uint32_t {