• Dianna Hu's avatar
    Make HpackVarintDecoder support 64-bit integers. · 30dd84d5
    Dianna Hu authored
    This feature is guarded by --chromium_flag_http2_varint_decode_64_bits.
    
    Before this change, HpackVarintDecoder only decoded integers up to 2^28
    + 2^prefix_length - 2, where prefix_length is between 3 and 7.  Trying
    to decode larger integers resulted in an error.  After this change,
    HpackVarintDecoder decodes any integer that can be represented on 64
    bits (unsigned).  Any input that HpackVarintDecoder decoded before this
    change is still decoded.
    
    Decoded integers are used to address entries in the static and dynamic
    tables, to specify string lengths, and to update the size limit of the
    dynamic table, both in HTTP/2 and in QUIC.  For all of these values
    there is already a limit in place that is much lower than 2^28
    (otherwise a malicious client could waste hundreds of megabytes of
    server memory; and if there is no such limit in place, then we already
    have a problem), so making the decoder decode larger values should not
    change behavior at higher levels.
    
    To merge this feature, this change also adds an HTTP/2 platform API for
    flags,  maintaining parity with SPDY and QUIC (and keeping the
    separation between SPDY and HTTP/2 for ease of merging to Chromium).
    This change then uses this platform API in the related files referencing
    the feature flag and adds a presubmit check.
    
    This change borrows heavily from the pre-existing SPDY and QUIC platform
    API for flags.
    
    This CL lands server changes 216463549 and 221087569 by bnc, and
    218390247 by diannahu.
    
    BUG=488484
    
    Change-Id: Ie0788f117aba9c6d41fc31148e28c9b49e122602
    Reviewed-on: https://chromium-review.googlesource.com/c/1310613Reviewed-by: default avatarBence Béky <bnc@chromium.org>
    Commit-Queue: Dianna Hu <diannahu@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#607349}
    30dd84d5
BUILD.gn 278 KB