hyperium / hyperium/hyper

Ability to access HTTP/2 pseudo headers

Open
#2,886 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-feature
Dominant language
Rust
Stars
16.3k
Forks
1.8k
Avg merge
1d 22h
Merged PRs (30d)
14

Description

Is your feature request related to a problem? Please describe.

It seems by design from what I'm reading that we're not able to access the HTTP/2 pseudo headers.
So the answer might be no, but if so a resolution might be at the very least that we document this somewhere more clearly,
so for now it is pretty unclear for a newcomer IMHO.

Yes, we can access these values in other ways (e.g. req.method, req.uri.authoritiy, req.uri.scheme, req.uri.path, etc..).
While the spec defines that:

  • these pseudo headers must come before any regular http headers
  • and method, scheme and path MUST be defined

It still leaves room for:

  • the order beween these pseudo headers
  • when the authority headers and such are given

Describe the solution you'd like

Is there a way to simply be able to get them as part of the regular headers? I mean the info was received when parsing it, so it's a bit of a shame it is lost by the time I can access the request.

Describe alternatives you've considered

  • assembling the headers myself for logging / analytics: but that leaves room for error as I do not know their exact order or if a header that isn't required was really given or not;
  • not use hyper and instead do it via more low level building blocks but that seems like reinventing the wheel (again) and probably making a lot of mistakes on the way;

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the request header access APIs and the HTTP/2 parsing behavior described in the issue. Determine whether pseudo headers are intentionally omitted, whether their original order and presence can be preserved, and whether the appropriate outcome is exposing them or documenting the limitation.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.