MagicStack / MagicStack/uvloop
start_tls() loses buffered data and doesn't work when upgrading a stream
Nobody has claimed this yet.
- Dominant language
- Cython
- Stars
- 11.9k
- Forks
- 616
- PR merge metrics
- No merged PRs in 30d
Description
When using StreamWriter.start_tls() (or loop.start_tls()) to upgrade a connection to TLS mid-stream, any data already buffered in the StreamReader is lost, and the call hangs forever.
The problem is present in asyncio too: https://github.com/python/cpython/issues/142352 , and a solution has been provided: https://github.com/python/cpython/pull/142354
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with StreamWriter.start_tls() and loop.start_tls(), then read the linked CPython issue and proposed pull request for the intended behavior. Done means upgrading a mid-stream connection without losing data already buffered in StreamReader and without the call hanging forever.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- networking
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100