You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by ma...@apache.org on 2017/05/06 02:38:04 UTC
[trafficserver] branch master updated: h2spec: handling PRIORITY
frame that depend on itself
This is an automated email from the ASF dual-hosted git repository.
maskit pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficserver.git
The following commit(s) were added to refs/heads/master by this push:
new 0098932 h2spec: handling PRIORITY frame that depend on itself
0098932 is described below
commit 0098932a0094c28034bf0743825491d141ee0b99
Author: Zizhong Zhang <zi...@linkedin.com>
AuthorDate: Tue May 2 15:45:30 2017 -0700
h2spec: handling PRIORITY frame that depend on itself
---
proxy/http2/Http2ConnectionState.cc | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc
index bf4a7aa..3248643 100644
--- a/proxy/http2/Http2ConnectionState.cc
+++ b/proxy/http2/Http2ConnectionState.cc
@@ -270,7 +270,7 @@ rcv_headers_frame(Http2ConnectionState &cstate, const Http2Frame &frame)
}
// Protocol error if the stream depends on itself
if (stream_id == params.priority.stream_dependency) {
- return Http2Error(Http2ErrorClass::HTTP2_ERROR_CLASS_CONNECTION, Http2ErrorCode::HTTP2_ERROR_PROTOCOL_ERROR,
+ return Http2Error(Http2ErrorClass::HTTP2_ERROR_CLASS_STREAM, Http2ErrorCode::HTTP2_ERROR_PROTOCOL_ERROR,
"recv headers self dependency");
}
@@ -387,6 +387,12 @@ rcv_priority_frame(Http2ConnectionState &cstate, const Http2Frame &frame)
"priority parse error");
}
+ // A stream cannot depend on itself. An endpoint MUST treat this as a stream error of type PROTOCOL_ERROR.
+ if (stream_id == priority.stream_dependency) {
+ return Http2Error(Http2ErrorClass::HTTP2_ERROR_CLASS_STREAM, Http2ErrorCode::HTTP2_ERROR_PROTOCOL_ERROR,
+ "PRIORITY frame depends on itself");
+ }
+
DebugHttp2Stream(cstate.ua_session, stream_id, "PRIORITY - dep: %d, weight: %d, excl: %d, tree size: %d",
priority.stream_dependency, priority.weight, priority.exclusive_flag, cstate.dependency_tree->size());
--
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].