You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is what tomchristie suggested in the discussion. #871 (comment)
We could then either...
Make the available through a publicly documented response extension.trailing_data
Ensure that the is returned by the network stream, on the first .trailing_data``.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 event back onto the stream...h11
# This kinda thing...classUpgradeNetworkStream():
def__init__(self, leading_data, network_stream):
# We need to push any data that's already been read back onto the stream.self._leading_data=leading_dataself._network_stream=network_streamdefread(...)
ifself._leading_data:
initial=self._leading_dataself._leading_data=b''returninitialelse:
returnself._network_stream.read()
Thanks @MtkN1. If you (or anyone else) would like to work on this, a good starting point might be a PR that raises an exception in HTTP11Connection/AsyncHTTP11Connection whenever an Upgrade/CONNECT occurs.
Activity
lovelydinosaur commentedon Jan 24, 2024
Thanks @MtkN1. If you (or anyone else) would like to work on this, a good starting point might be a PR that raises an exception in
HTTP11Connection/AsyncHTTP11Connectionwhenever anUpgrade/CONNECToccurs.[-]Add incoming data access to the public API[/-][+]Support connection `Upgrade` and `CONNECT`.[/+]lovelydinosaur commentedon Feb 20, 2024
Thank you @MtkN1 for contributing to close this issue! ⭐
The rewards from this issue, totalling $200, has been shared with you.
What now?
If you already have a Polar account setup, you don't need to do anything.
MtkN1 commentedon Feb 20, 2024
Wow, I'm surprised there's such a reward! I've set up Polar since I have a Stripe account 🙂