pgjones / hypercorn

Hypercorn is an ASGI and WSGI Server based on Hyper libraries and inspired by Gunicorn.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Improve WSGI behavior for large requests.

apollo13 opened this issue · comments

Currently the whole request body is buffered in memory even when it doesn't have to be:

body.extend(message.get("body", b"")) # type: ignore

a2wsgi utilizes a thread pool to properly stream this in. Would this be worth to add to hypercorn as well (I realize it will increase complexity, but on the other hand it would be nice to have a modern [somewhat performant] wsgi/asgi server).