Repository: trafficserver Updated Branches: refs/heads/6.0.x 975c4c8ca -> 8aba18157
Revert "TS-3752: Problem with larger headers and HTTP/2" This reverts commit 6c4c7226ea4d25c084d1d6b97ae6fec262b9f1f3. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/8aba1815 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/8aba1815 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/8aba1815 Branch: refs/heads/6.0.x Commit: 8aba181578b217c7fc5d542f0d599ad666ae4e05 Parents: 975c4c8 Author: Leif Hedstrom <[email protected]> Authored: Wed Jul 29 20:09:07 2015 -0600 Committer: Leif Hedstrom <[email protected]> Committed: Wed Jul 29 20:09:07 2015 -0600 ---------------------------------------------------------------------- proxy/http2/Http2ConnectionState.cc | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8aba1815/proxy/http2/Http2ConnectionState.cc ---------------------------------------------------------------------- diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc index eb24735..5235311 100644 --- a/proxy/http2/Http2ConnectionState.cc +++ b/proxy/http2/Http2ConnectionState.cc @@ -231,7 +231,7 @@ rcv_headers_frame(Http2ClientSession &cs, Http2ConnectionState &cstate, const Ht // 4.3. A receiver MUST terminate the connection with a // connection error of type COMPRESSION_ERROR if it does // not decompress a header block. - if (decoded_bytes == HPACK_ERROR_COMPRESSION_ERROR) { + if (decoded_bytes == 0 || decoded_bytes == HPACK_ERROR_COMPRESSION_ERROR) { return HTTP2_ERROR_COMPRESSION_ERROR; } @@ -560,7 +560,7 @@ rcv_continuation_frame(Http2ClientSession &cs, Http2ConnectionState &cstate, con // A receiver MUST terminate the connection with a // connection error of type COMPRESSION_ERROR if it does // not decompress a header block. - if (decoded_bytes == HPACK_ERROR_COMPRESSION_ERROR) { + if (decoded_bytes == 0 || decoded_bytes == HPACK_ERROR_COMPRESSION_ERROR) { return HTTP2_ERROR_COMPRESSION_ERROR; } @@ -784,8 +784,6 @@ 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)); @@ -831,11 +829,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 (;;) { @@ -894,8 +892,6 @@ 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; @@ -945,8 +941,6 @@ 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]); @@ -961,8 +955,6 @@ Http2ConnectionState::send_rst_stream_frame(Http2StreamId id, Http2ErrorCode ec) 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]); @@ -977,8 +969,6 @@ 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; @@ -1001,8 +991,6 @@ 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]);
