Skip to content

x/net/http2: toggle HPACK dynamic table indexing for header #15592

@blixt

Description

@blixt

Often a service will have certain header fields that have no discernible repeatable pattern (or the possible combinations far outnumber the HPACK table slots). It would be good to be able to turn off HPACK for those headers so that these non-repeating values don't use up slots in the dynamic table.

Here's a quote from Apple's APNs documentation touching on this:

APNs requires the use of HPACK (header compression for HTTP/2), which prevents repeated header keys and values. APNs maintains a small dynamic table for HPACK. To help avoid filling up the APNs HPACK table and necessitating the discarding of table data, encode headers in the following way—especially when sending a large number of streams:

  • The :path header should be encoded as a literal header field without indexing,
  • The apns-id and apns-expiration headers should be encoded differently depending on initial or subsequent POST operation, as follows:
    • The first time you send these headers, encode them with incremental indexing to allow the header names to be added to the dynamic table
    • Subsequent times you send these headers, encode them as literal header fields without indexing

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureRequestIssues asking for a new feature that does not need a proposal.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions