pgjones / hypercorn

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

Fix bad disconnects in HTTP/1.1 with keep_alive_max_requests #227

Closed alex-anthropic closed 4 months ago

alex-anthropic commented 4 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