floom4 commented on PR #12748:
URL: https://github.com/apache/trafficserver/pull/12748#issuecomment-3641894029

   My understanding of the RFC is that the condition defining a valid response 
without payload is the stream ending at header or continuation frame.
   Considering that data_length is only incremented inside *rcv_data_frame*, I 
assumed that having data_length == 0 means that *rcv_data_frame* wasn't called.
   
   However, if you prefer we could skip this check in *rcv_header_frame* and 
*rcv_continuation_frame* if and only if they are not trailing headers (since 
trailing headers implies that data frames where received)
   
   Here is an alternative condition that could be used:
   ```C++
   if (stream->receive_end_stream && stream->trailing_header_is_possible() && 
!stream->payload_length_is_valid()) {
   ```
   In both:
   - rcv_header_frame 
https://github.com/apache/trafficserver/blob/0e4287020548e7316156a4debfed49c0fedc7312/src/proxy/http2/Http2ConnectionState.cc#L505
   - rcv_continuation_frame 
https://github.com/apache/trafficserver/blob/0e4287020548e7316156a4debfed49c0fedc7312/src/proxy/http2/Http2ConnectionState.cc#L1117
   
   


-- 
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.

To unsubscribe, e-mail: [email protected]

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

Reply via email to