Open
Description
Recently, I've been trying to use a popular .NET library, Grpc.Net, to make outbound gRPC connections using a port of System.Net.Http
to wasi-http. I was able to get it to work, but had to hack a few things:
- Patched
wasmtime-wasi-http
to use HTTP/2 for all outgoing requests - Patched
System.Net.Http
to assume incoming responses use HTTP/2 - Patched
wasmtime-wasi-http
'sis_forbidden_header
to allow all headers
Ideally, none of those hacks would be necessary, so I'd like to propose the following additions to the wasi-http spec:
- (Optional) Add documentation to clarify that the set of "forbidden" headers may vary among implementations. E.g. browsers might prohibit
TE
headers, butwasmtime-wasi-http
might allow them (and indeed should allow them). - Add a method on
outgoing-request
to specify the HTTP version to use. The implementation should return an error if it can't guarantee that version will be used. - Add a method on
incoming-response
to retrieve the HTTP version of the response, e.g. as anoption<http-version>
wherehttp-version
is an enum type andnone
means the version is not known. This allows the client to detect if the server downgraded the connection to a lower version.
See also bytecodealliance/wasmtime#7538 for further discussion.
Metadata
Metadata
Assignees
Labels
No labels