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 2017/05/11 11:50:22 UTC

[trafficserver] branch 7.1.x updated: Allow receiving H2 frames on server initiated streams

This is an automated email from the ASF dual-hosted git repository.

zwoop pushed a commit to branch 7.1.x
in repository https://gitbox.apache.org/repos/asf/trafficserver.git

The following commit(s) were added to refs/heads/7.1.x by this push:
       new  38da819   Allow receiving H2 frames on server initiated streams
38da819 is described below

commit 38da8195600ba9735c4126ae9767bf5c8da07376
Author: Masakazu Kitajo <ma...@apache.org>
AuthorDate: Thu May 11 15:06:39 2017 +0900

    Allow receiving H2 frames on server initiated streams
    
    After supporting H2 server push, server can initiate streams.
    We haven't taken account of them in some checks.
    
    (cherry picked from commit 37a315b16050c2493c4def6b474369b426076afc)
---
 proxy/http2/Http2ClientSession.cc   | 6 ------
 proxy/http2/Http2ConnectionState.cc | 2 +-
 2 files changed, 1 insertion(+), 7 deletions(-)

diff --git a/proxy/http2/Http2ClientSession.cc b/proxy/http2/Http2ClientSession.cc
index 2416502..fe5086e 100644
--- a/proxy/http2/Http2ClientSession.cc
+++ b/proxy/http2/Http2ClientSession.cc
@@ -429,12 +429,6 @@ Http2ClientSession::do_start_frame_read(Http2ErrorCode &ret_error)
     return -1;
   }
 
-  // Allow only stream id = 0 or streams started by client.
-  if (this->current_hdr.streamid != 0 && !http2_is_client_streamid(this->current_hdr.streamid)) {
-    ret_error = Http2ErrorCode::HTTP2_ERROR_PROTOCOL_ERROR;
-    return -1;
-  }
-
   // CONTINUATIONs MUST follow behind HEADERS which doesn't have END_HEADERS
   Http2StreamId continued_stream_id = this->connection_state.get_continued_stream_id();
 
diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc
index 8b26b12..3ec834b 100644
--- a/proxy/http2/Http2ConnectionState.cc
+++ b/proxy/http2/Http2ConnectionState.cc
@@ -429,7 +429,7 @@ rcv_rst_stream_frame(Http2ConnectionState &cstate, const Http2Frame &frame)
   // frame is received with a stream identifier of 0x0, the recipient MUST
   // treat this as a connection error (Section 5.4.1) of type
   // PROTOCOL_ERROR.
-  if (!http2_is_client_streamid(stream_id)) {
+  if (stream_id == 0) {
     return Http2Error(Http2ErrorClass::HTTP2_ERROR_CLASS_CONNECTION, Http2ErrorCode::HTTP2_ERROR_PROTOCOL_ERROR,
                       "reset access stream with invalid id");
   }

-- 
To stop receiving notification emails like this one, please contact
['"commits@trafficserver.apache.org" <co...@trafficserver.apache.org>'].