Repository: trafficserver Updated Branches: refs/heads/master b7f431406 -> a5818b350
TS-3752: Problem with larger headers and HTTP/2 Added back in the debug messages Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/a5818b35 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/a5818b35 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/a5818b35 Branch: refs/heads/master Commit: a5818b350d48ea14598d1c876124b393a936f3c9 Parents: b7f4314 Author: Bryan Call <[email protected]> Authored: Thu Aug 13 14:05:22 2015 -0700 Committer: Bryan Call <[email protected]> Committed: Thu Aug 13 14:05:22 2015 -0700 ---------------------------------------------------------------------- proxy/http2/Http2ConnectionState.cc | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a5818b35/proxy/http2/Http2ConnectionState.cc ---------------------------------------------------------------------- diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc index 3d94dfd..7cae2fd 100644 --- a/proxy/http2/Http2ConnectionState.cc +++ b/proxy/http2/Http2ConnectionState.cc @@ -859,6 +859,8 @@ Http2ConnectionState::cleanup_streams() void Http2ConnectionState::set_continued_headers(const char *buf, uint32_t len, Http2StreamId id) { + DebugSsn(this->ua_session, "http2_cs", "[%" PRId64 "] Send CONTINUATION frame.", this->ua_session->connection_id()); + if (buf && len > 0) { if (!continued_buffer.iov_base) { continued_buffer.iov_base = static_cast<uint8_t *>(ats_malloc(len)); @@ -904,11 +906,11 @@ Http2ConnectionState::update_initial_rwnd(Http2WindowSize new_size) void Http2ConnectionState::send_data_frame(FetchSM *fetch_sm) { + DebugSsn(this->ua_session, "http2_cs", "[%" PRId64 "] Send DATA frame", this->ua_session->connection_id()); + size_t buf_len = BUFFER_SIZE_FOR_INDEX(buffer_size_index[HTTP2_FRAME_TYPE_DATA]) - HTTP2_FRAME_HEADER_LEN; uint8_t payload_buffer[buf_len]; - DebugSsn(this->ua_session, "http2_cs", "[%" PRId64 "] Send DATA frame.", this->ua_session->connection_id()); - Http2Stream *stream = static_cast<Http2Stream *>(fetch_sm->ext_get_user_data()); for (;;) { @@ -967,6 +969,8 @@ Http2ConnectionState::send_data_frame(FetchSM *fetch_sm) void Http2ConnectionState::send_headers_frame(FetchSM *fetch_sm) { + DebugSsn(this->ua_session, "http2_cs", "[%" PRId64 "] Send HEADERS frame.", this->ua_session->connection_id()); + const size_t buf_len = BUFFER_SIZE_FOR_INDEX(buffer_size_index[HTTP2_FRAME_TYPE_HEADERS]) - HTTP2_FRAME_HEADER_LEN; uint8_t payload_buffer[buf_len]; size_t payload_length = 0; @@ -1016,6 +1020,8 @@ Http2ConnectionState::send_headers_frame(FetchSM *fetch_sm) void Http2ConnectionState::send_rst_stream_frame(Http2StreamId id, Http2ErrorCode ec) { + DebugSsn(this->ua_session, "http2_cs", "[%" PRId64 "] Send RST_STREAM frame.", this->ua_session->connection_id()); + Http2Frame rst_stream(HTTP2_FRAME_TYPE_RST_STREAM, id, 0); rst_stream.alloc(buffer_size_index[HTTP2_FRAME_TYPE_RST_STREAM]); @@ -1065,6 +1071,8 @@ Http2ConnectionState::send_settings_frame(const Http2ConnectionSettings &new_set void Http2ConnectionState::send_ping_frame(Http2StreamId id, uint8_t flag, const uint8_t *opaque_data) { + DebugSsn(this->ua_session, "http2_cs", "[%" PRId64 "] Send PING frame.", this->ua_session->connection_id()); + Http2Frame ping(HTTP2_FRAME_TYPE_PING, id, flag); ping.alloc(buffer_size_index[HTTP2_FRAME_TYPE_PING]); @@ -1079,6 +1087,8 @@ Http2ConnectionState::send_ping_frame(Http2StreamId id, uint8_t flag, const uint void Http2ConnectionState::send_goaway_frame(Http2StreamId id, Http2ErrorCode ec) { + DebugSsn(this->ua_session, "http2_cs", "[%" PRId64 "] Send GOAWAY frame.", this->ua_session->connection_id()); + Http2Frame frame(HTTP2_FRAME_TYPE_GOAWAY, 0, 0); Http2Goaway goaway; @@ -1101,6 +1111,8 @@ Http2ConnectionState::send_goaway_frame(Http2StreamId id, Http2ErrorCode ec) void Http2ConnectionState::send_window_update_frame(Http2StreamId id, uint32_t size) { + DebugSsn(this->ua_session, "http2_cs", "[%" PRId64 "] Send WINDOW_UPDATE frame.", this->ua_session->connection_id()); + // Create WINDOW_UPDATE frame Http2Frame window_update(HTTP2_FRAME_TYPE_WINDOW_UPDATE, id, 0x0); window_update.alloc(buffer_size_index[HTTP2_FRAME_TYPE_WINDOW_UPDATE]);
