Skip to content

Trailing Data in WebSocket Upgrade Requests #871

Discussion options

You must be logged in to vote

Oh interesting yup. The h11 documentation on this is helpful.

If we wanted to deal with this in public API we'd need to handle the CONNECT and Upgrade cases in our HTTP11Connection/AsyncHTTP11Connection code.

We could then either...

  • Make the trailing_data available through a publicly documented response extension.
  • Ensure that the trailing_data is returned by the network stream, on the first .read().

The second one of these is neatest from the user-perspective.

We'd probably implement that as a proxy class onto the underlying network stream, that's able to additionally deal with pushing the trailing data in the h11 event back onto the stream...

# This kinda thing...
class UpgradeNetworkS…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@MtkN1
Comment options

@tomchristie
Comment options

Answer selected by MtkN1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants