shinrich commented on a change in pull request #6889:
URL: https://github.com/apache/trafficserver/pull/6889#discussion_r452271327



##########
File path: proxy/http2/Http2ConnectionState.cc
##########
@@ -242,7 +242,7 @@ rcv_headers_frame(Http2ConnectionState &cstate, const 
Http2Frame &frame)
   if (cstate.is_valid_streamid(stream_id)) {
     stream = cstate.find_stream(stream_id);
     if (stream == nullptr || !stream->has_trailing_header()) {
-      return Http2Error(Http2ErrorClass::HTTP2_ERROR_CLASS_CONNECTION, 
Http2ErrorCode::HTTP2_ERROR_STREAM_CLOSED,

Review comment:
       Specifically it was a problem in the 8 section.
   
   ```
   Hypertext Transfer Protocol Version 2 (HTTP/2)
                  8. HTTP Message Exchanges
                    8.1. HTTP Request/Response Exchange
                      × 1: Sends a second HEADERS frame without the END_STREAM 
flag
                        -> The endpoint MUST respond with a stream error of 
type PROTOCOL_ERROR.
                           Expected: GOAWAY Frame (Error Code: PROTOCOL_ERROR)
                                     RST_STREAM Frame (Error Code: 
PROTOCOL_ERROR)
                                     Connection closed
                             Actual: Timeout
                
                      8.1.2. HTTP Header Fields
                        8.1.2.1. Pseudo-Header Fields
                          × 3: Sends a HEADERS frame that contains a 
pseudo-header field as trailers
                            -> The endpoint MUST respond with a stream error of 
type PROTOCOL_ERROR.
                               Expected: GOAWAY Frame (Error Code: 
PROTOCOL_ERROR)
                                         RST_STREAM Frame (Error Code: 
PROTOCOL_ERROR)
                                         Connection closed
                                 Actual: Timeout
   ```
   
   I assume in earlier version of the PR when the netvc close was in the 
Http2ClientSession::do_io_close() the "Connection closed" case triggered and 
addressed these cases.
   
   Splitting the checks as you suggest also solves the issue.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to