pgjones / hypercorn

Hypercorn is an ASGI and WSGI Server based on Hyper libraries and inspired by Gunicorn.
MIT License
1.18k stars 105 forks source link

Fix bad disconnects in HTTP/1.1 with keep_alive_max_requests #227

Closed alex-anthropic closed 6 months ago

alex-anthropic commented 6 months ago

Adds a test that demonstrates bad behavior with the previous implementation of keep_alive_max_requests in HTTP/1.1 and fixes the issue.

Previously this would die with httpx.ReadError: socket connection broken: [Errno 54] Connection reset by peer

after the third request