diff options
| author | Roman Arutyunyan <arut@nginx.com> | 2026-02-11 12:29:37 +0000 |
|---|---|---|
| committer | Roman Arutyunyan <arutyunyan.roman@gmail.com> | 2026-02-11 18:57:43 +0400 |
| commit | f8e1bc5b9821eba7995905fe46c8ca383b5ea782 (patch) | |
| tree | 2739176c5bb2b5e372ab5c906d7ff97ca1e48cf8 /src/http/ngx_http_variables.c | |
| parent | d662a5cc469b64d9423ccae0a400ca34d11c3764 (diff) | |
| download | nginx-f8e1bc5b9821eba7995905fe46c8ca383b5ea782.tar.gz nginx-f8e1bc5b9821eba7995905fe46c8ca383b5ea782.tar.bz2 | |
Proxy: fixed HTTP/2 upstream with caching enabled.
Previously, when proxy_cache and keepalive were both enabled with an
HTTP/2 upstream, the second request for a cached resource could fail with
"upstream sent frame for unknown stream" error followed by "cache file
contains invalid header".
This happened because ctx->id was set to 1 in the case when no upstream
connection exists (e.g. cache hit), making the stream id check fail when
the cached response contained frames from a different stream.
The fix is to set ctx->id to 0 when there is no upstream connection,
indicating that no real stream exists, and skip the stream id validation
in this case. Also, ctx->id = 1 is now set only for new connections,
not in the shared done label.
Closes: https://github.com/nginx/nginx/issues/1101
Diffstat (limited to 'src/http/ngx_http_variables.c')
0 files changed, 0 insertions, 0 deletions
