You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2015/07/31 04:14:01 UTC

[5/9] trafficserver git commit: TS-3766 Ignore unknown frame in debugging

TS-3766 Ignore unknown frame in debugging


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/8a2b2413
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/8a2b2413
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/8a2b2413

Branch: refs/heads/6.0.x
Commit: 8a2b2413399d4fb11a69431146db8d7ebee7219f
Parents: 0749fd8
Author: Masaori Koshiba <mk...@yahoo-corp.jp>
Authored: Thu Jul 30 13:47:02 2015 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Thu Jul 30 13:47:02 2015 -0600

----------------------------------------------------------------------
 proxy/http2/Http2ConnectionState.cc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/8a2b2413/proxy/http2/Http2ConnectionState.cc
----------------------------------------------------------------------
diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc
index 5235311..32921fc 100644
--- a/proxy/http2/Http2ConnectionState.cc
+++ b/proxy/http2/Http2ConnectionState.cc
@@ -653,9 +653,11 @@ Http2ConnectionState::main_event_handler(int event, void *edata)
     Http2StreamId last_streamid = frame->header().streamid;
     Http2ErrorCode error;
 
-    //  Implementations MUST ignore and discard any frame that has a type that is unknown.
-    ink_assert(frame->header().type < HTTP2_FRAME_TYPE_MAX);
+    // 5.5 Extending HTTP/2
+    //   Implementations MUST discard frames that have unknown or unsupported types.
     if (frame->header().type >= HTTP2_FRAME_TYPE_MAX) {
+      DebugSsn(this->ua_session, "http2_cs", "[%" PRId64 "] Discard a frame which has unknown type, type=%x",
+               this->ua_session->connection_id(), frame->header().type);
       return 0;
     }