Description
Presently, it seems that the Header/HPACK process in H2 is opaque. However, sometimes it is necessary to control how headers are indexed (or re-indexed) into the HPACK dictionary.
(e.g. https://tools.ietf.org/html/rfc7541#section-6.2.1 )
Specifically, I am writing a tool which pushes via Apple APN. It has requirements for some, but not all of its headers to be set differently, based on whether it is the first send of the request, or subsequent ones.
From Apple's docs : https://developer.apple.com/library/content/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html
The :path value should be encoded as a literal header field without indexing
The authorization request header, if present, should be encoded as a literal header field without indexing
The appropriate encoding to employ for the apns-id, apns-expiration, and apns-collapse-id request headers differs depending on whether it is part of the initial or a 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