Github user maskit commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/1262#discussion_r94286274
  
    --- Diff: proxy/http2/Http2ConnectionState.cc ---
    @@ -728,18 +732,18 @@ rcv_continuation_frame(Http2ConnectionState &cstate, 
const Http2Frame &frame)
         cstate.clear_continued_stream_id();
     
         if (!stream->change_state(HTTP2_FRAME_TYPE_CONTINUATION, 
frame.header().flags)) {
    -      return Http2Error(HTTP2_ERROR_CLASS_CONNECTION, 
HTTP2_ERROR_PROTOCOL_ERROR);
    +      return Http2Error(HTTP2_ERROR_CLASS_CONNECTION, 
HTTP2_ERROR_PROTOCOL_ERROR, "continuation no state change");
         }
     
         Http2ErrorCode result = 
stream->decode_header_blocks(*cstate.local_hpack_handle);
     
         if (result != HTTP2_ERROR_NO_ERROR) {
           if (result == HTTP2_ERROR_COMPRESSION_ERROR) {
    -        return Http2Error(HTTP2_ERROR_CLASS_CONNECTION, 
HTTP2_ERROR_COMPRESSION_ERROR);
    +        return Http2Error(HTTP2_ERROR_CLASS_CONNECTION, 
HTTP2_ERROR_COMPRESSION_ERROR, "continuation compression error");
           } else if (result == HTTP2_ERROR_ENHANCE_YOUR_CALM) {
    -        return Http2Error(HTTP2_ERROR_CLASS_CONNECTION, 
HTTP2_ERROR_ENHANCE_YOUR_CALM);
    +        return Http2Error(HTTP2_ERROR_CLASS_CONNECTION, 
HTTP2_ERROR_ENHANCE_YOUR_CALM, "continuation enhance your calm");
           } else {
    -        return Http2Error(HTTP2_ERROR_CLASS_STREAM, 
HTTP2_ERROR_PROTOCOL_ERROR);
    +        return Http2Error(HTTP2_ERROR_CLASS_CONNECTION, 
HTTP2_ERROR_PROTOCOL_ERROR, "continuation decode error");
    --- End diff --
    
    This case is actually not for a decode error but HTTP2 violation, such as 
using uppercase in header names. All decode errors should be handled as 
compression error. We don't have to abandon all following requests with a 
connection error, because the HPACK decoder instance keeps valid status. Please 
see 8.1.2.6.
    
    I'd put a message like "continuation malformed request".


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to