Skip to content

Tests: empty HTTP/2 upstream response keepalive. - #114

Open
locker95 wants to merge 1 commit into
nginx:masterfrom
locker95:test/http2-empty-response-keepalive-1726
Open

locker95 wants to merge 1 commit into
nginx:masterfrom
locker95:test/http2-empty-response-keepalive-1726

Conversation

@locker95

@locker95 locker95 commented Sep 6, 2026

Copy link
Copy Markdown

Check keepalive reuse when an HTTP/2 upstream sends SETTINGS, PING, and an empty END_STREAM response together. This reproduces nginx/nginx#1726, reported by @bungle.

Accompanying source fix: nginx/nginx#1731.

The test covers empty 200, 204, 304, and HEAD responses in buffered and unbuffered modes. Each request pair starts on a fresh connection, and the backend checks that the SETTINGS and PING acknowledgements arrive before the second request. GOAWAY and an incomplete trailing frame are also checked to prevent unsafe reuse.

With nginx master at 231a60ee, 24 of 42 assertions fail. With the accompanying control-frame flush fix, all 42 pass, including ten consecutive runs. The HTTP/2 proxy tests, upstream_keepalive.t, and proxy_cache_convert_head.t pass together: 17 files, 292 assertions.

Tested with a native macOS arm64 debug build. Linux and sanitizer runs have not been performed.

Check buffered and unbuffered empty responses, including HEAD, 204,
and 304. Verify that control acknowledgements reach the upstream before
the next request, and that GOAWAY and partial frames prevent reuse.

See nginx/nginx#1726.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

1 participant