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

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

commit aaa9d0cff5293e022ee1213a7155c7192308a46c
Author: Bryan Call <[email protected]>
AuthorDate: Mon Sep 10 09:59:47 2018 -0700

    Fixed error getting h2 HEADERS frame after stream is closed
    
    (cherry picked from commit 0d462f930d7f23ff7f43e0ecb63262d07b8d7c80)
---
 proxy/http2/Http2ConnectionState.cc | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/proxy/http2/Http2ConnectionState.cc 
b/proxy/http2/Http2ConnectionState.cc
index 01c0125..040a7e7 100644
--- a/proxy/http2/Http2ConnectionState.cc
+++ b/proxy/http2/Http2ConnectionState.cc
@@ -229,6 +229,11 @@ rcv_headers_frame(Http2ConnectionState &cstate, const 
Http2Frame &frame)
     }
   }
 
+  // Ignoring HEADERS frame on a closed stream.  The HdrHeap has gone away and 
it will core.
+  if (stream->get_state() == Http2StreamState::HTTP2_STREAM_STATE_CLOSED) {
+    return Http2Error(Http2ErrorClass::HTTP2_ERROR_CLASS_NONE);
+  }
+
   // keep track of how many bytes we get in the frame
   stream->request_header_length += payload_length;
   if (stream->request_header_length > Http2::max_request_header_size) {

Reply via email to