Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose protocol version #27

Open
lann opened this issue Apr 19, 2023 · 1 comment
Open

Expose protocol version #27

lann opened this issue Apr 19, 2023 · 1 comment

Comments

@lann
Copy link
Contributor

lann commented Apr 19, 2023

e.g.:

variant version {
  HTTP11,
  HTTP20,
  HTTP30,
  other(string),
}

incoming-request-version: func(request: incoming-request) -> version

It would be nice to make the labels e.g. HTTP-1-1, but this isn't currently allowed; see WebAssembly/component-model#134

@lukewagner
Copy link
Member

Yeah, I can see how that would be useful.

One general concern is that we want components to be version-agnostic so that the HTTP version can be upgraded over time by the host without breaking existing code. IIUC, for this reason, the HTTP version isn't included in the HTTP semantics which, thus far, we've been mirroring with HTTP interface. On the other hand, it does seem like there are plenty of benign use cases where you might want to, e.g., log the version. One idea is that requests could have an optional child resource (hanging off the request resource), say called connection-info, that had various wire format details including HTTP version but also, say, client IP address (which I've seen use cases for and is also not part of HTTP semantics).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants