httpcore
httpcore copied to clipboard
Support `"data_stream"` extension for HTTP/2.
We should support a new data_stream
extension for HTTP/2.
Rather than .read()
and .write()
mapping directly onto the TCP stream they should instead wrap onto DataFrames over a single stream ID.
This would allow us to support HTTP/2's "extended CONNECT" and WebSockets-over-HTTP/2.
See: https://www.rfc-editor.org/rfc/rfc8441.html
I've retitled this slightly, since I think that we want to add this as a new extension.
We can expose the raw "network_stream"
in the same way we do for HTTP/1.1 connections, which would allow developers to get additional information such as the ssl context, connected IPs etc. Or to bust everything up by writing HTTP/2 frames or any other nonsense directly to the TCP connection.