nginx / unit

NGINX Unit - universal web app server - a lightweight and versatile open source server that simplifies the application stack by natively executing application code across eight different programming language runtimes.
https://unit.nginx.org
Apache License 2.0
5.25k stars 320 forks source link

[Epic] Support `Transfer-Encoding: chunked` for all data flows #1278

Open callahad opened 1 month ago

callahad commented 1 month ago

Right now Unit does not support incoming requests with Transfer-Encoding: chunked.

We should do so.

There are two main data paths: proxying to an external upstream, and passing to a Unit-hosted application runtime.

There are also two possible operation modes: buffering the incoming request until completion, then forwarding it on with Content-Length, or directly streaming while the request is still incoming. We'll do the first, then leave the latter for future potential optimization.

Necessary Tasks:

Potential Tasks:

hongzhidao commented 3 weeks ago

Hi, I plan to get the application process to parse the chunked request body next, any suggestions are welcome.