bryancall commented on a change in pull request #6923:
URL: https://github.com/apache/trafficserver/pull/6923#discussion_r443710183



##########
File path: proxy/http2/Http2ConnectionState.cc
##########
@@ -328,11 +328,19 @@ rcv_headers_frame(Http2ConnectionState &cstate, const 
Http2Frame &frame)
     }
   }
 
+  stream->header_blocks_length = header_block_fragment_length;
+
+  // ATS advertises SETTINGS_MAX_HEADER_LIST_SIZE as a limit of total header 
blocks length. (Details in [RFC 7560] 10.5.1.)
+  // Make it double to relax the limit in cases of 1) HPACK is used naively, 
or 2) Huffman Encoding generates large header blocks.
+  // The total "decoded" header length is strictly checked by 
hpack_decode_header_block().
+  if (stream->header_blocks_length > std::max(Http2::max_header_list_size, 
Http2::max_header_list_size * 2)) {

Review comment:
       I am doing that incase we have an integer overflow.




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