- 
                Notifications
    You must be signed in to change notification settings 
- Fork 35
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-httpto use HTTP/2 for all outgoing requests
- Patched System.Net.Httpto assume incoming responses use HTTP/2
- Patched wasmtime-wasi-http'sis_forbidden_headerto 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 TEheaders, butwasmtime-wasi-httpmight allow them (and indeed should allow them).
- Add a method on outgoing-requestto 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-responseto retrieve the HTTP version of the response, e.g. as anoption<http-version>wherehttp-versionis an enum type andnonemeans 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.
thangchung and rajsite
Metadata
Metadata
Assignees
Labels
No labels