]> git.kaiwu.me - njs.git/commit
Fetch: honor response body framing
authorDmitry Volyntsev <xeioex@nginx.com>
Wed, 16 Sep 2026 00:35:30 +0000 (17:35 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Wed, 16 Sep 2026 21:17:38 +0000 (14:17 -0700)
commit9db1574f3e614b795787aca21a1e7eaccef0ba36
treecab8ce411fe330ee43ef21f738228bbc4b5a78d5
parentf7800499466f7ac8155ce0768a2ab9dbed5261f5
Fetch: honor response body framing

Previously, fetch inferred body completion from Content-Length alone. This
completed close-delimited responses before EOF and conflated framing modes.

The fix is to track body framing explicitly, reject unsupported 1xx
responses, and exempt 204 and 304 representation lengths from body limits.
nginx/ngx_js_http.c
nginx/ngx_js_http.h
nginx/t/js_fetch.t
nginx/t/js_fetch_keepalive.t