]> git.kaiwu.me - njs.git/commit
Fetch: avoid reusing framed response connections
authorDmitry Volyntsev <xeioex@nginx.com>
Wed, 16 Sep 2026 00:42:55 +0000 (17:42 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Wed, 16 Sep 2026 21:17:38 +0000 (14:17 -0700)
commit780f43317352be57ea2e7ffd9ad51d53d5b56869
tree6fab13e2715b7781228644ee4d91941208093047
parent9db1574f3e614b795787aca21a1e7eaccef0ba36
Fetch: avoid reusing framed response connections

Previously, fetch cached fixed-length responses with bytes after their
declared body. Bodyless and chunked responses with such bytes did not
complete correctly.

The fix is to close a framed response connection with unconsumed bytes
instead of adding it to the keepalive cache.
nginx/ngx_js_http.c
nginx/t/js_fetch_keepalive.t