• birenroy's avatar
    Implements incremental decode in HPACK. · 8fc656b6
    birenroy authored
    With incremental decode, headers may contain incomplete opcode. The change is divided into two parts: the HpackInputStream change in hpack_input_stream.h/cc, and the HpackDecoder change in Hpack_decoder.h/cc.
    
    After new data are added to the buffer (by calling
    HandleControlFrameHeadersData()), a new HpackInputStream is created
    based on the current data in the buffer, and as many data as possible
    are parsed. When an opcode is parsed successfully, remember the current
    position in the header (by calling MarkCurrentPosition()), and move on
    to the next opcode. If an opcode is incomplete, we return from the current
    parsing with false, and mark need_more_data_ to be true.
    The data have been successfully parsed will be removed
    from the buffer. Since we incrementally decode headers as data arrive,
    we remove the decode code in HandleControlFrameHeadersComplete().
    
    This CL lands server change 116551169 by yasong.
    
    BUG=488484
    
    Review URL: https://codereview.chromium.org/1914193002
    
    Cr-Commit-Position: refs/heads/master@{#389857}
    8fc656b6
hpack_input_stream.h 4.14 KB