Skip to content

Ability to access HTTP/2 pseudo headers #2886

Open
@GlenDC

Description

@GlenDC

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;

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-featureCategory: feature. This is adding a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions