Support for HTTP/2 non-indexed header fields
- Langage dominant
- Java
- Étoiles
- 12.1k
- Forks
- 4k
- Merge moyen
- 2 j 17 h
- PR mergées (30 j)
- 37
Description
### What version of gRPC are you using?
08efd978d7d2749cc267b0b6e61547af3d5c9515 (HEAD on Jan 3, 2019)
### What did you expect to see?
Ability to set header names outside of a-z, -
We are trying to send a signature value as gRPC metadata, the value changes with every message.
Metadata is translated to headers in HTTP/2 which in our case, due to HPACK, the client, server and reverse proxy store in [the dynamic](https://tools.ietf.org/html/draft-ietf-httpbis-header-compression-12#section-2.3.2) table for header compression.
As a result the dynamic table size will increase until its full ([by default up to 4096 octets](https://tools.ietf.org/html/rfc7540#section-6.5.2)).
When it's entries are removed from the dynamic table in FIFO order to make space for the new entries.
This is undesirable because of the increase in memory use in our proxy and because after X requests all the headers are resent.
HTTP/2 supports non-indexed headers, which as far as I can gather from the docs, [do not get stored in the dynamic table](https://tools.ietf.org/html/draft-ietf-httpbis-header-compression-12#section-6.2.2).
You signal a non-indexed header with the first four bytes of the header key being '0001' or '0000'.
However these are non-valid ASCII characters and thus do not get through the [validity check](https://github.com/grpc/grpc-java/blob/5dbe53c050d8e5f82b65df1e0c110e5c4fdaa5e7/core/src/main/java/io/grpc/Metadata.java#L620).
I'm sure the validity check is there for a reason, and I very much realize we're in an edge case here.
Would it be possible at all to bypass the check or is this something that shouldn't be done for compatibility reasons?
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par le contrôle de validité dans core/src/main/java/io/grpc/Metadata.java autour de la ligne 620, puis lisez les sections liées de HTTP/2 et HPACK pour comprendre le comportement demandé pour les en-têtes non indexés. Déterminez si la prise en charge de ces noms de métadonnées est compatible avec la validation existante et définissez le comportement sans risque pour la compatibilité qui constituerait l’achèvement du travail.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- grpc, java
- Domaine
- api, networking
- Type d'issue
- Fonctionnalité
- Difficulté
- 5/5
- Temps estimé
- Plus d'une semaine
- Activité
- À l'abandon
- Clarté
- À clarifier
- Accessibilité débutants
- 25/100