Skip to content

H2 no server push - #33

Merged
pgit merged 2 commits into
masterfrom
h2-no-server-push
Nov 3, 2026
Merged

pgit merged 2 commits into
masterfrom
h2-no-server-push

Conversation

@pgit

@pgit pgit commented Nov 3, 2026

Copy link
Copy Markdown
Owner

No description provided.

pgit and others added 2 commits November 3, 2026 12:12
…the body

It could only POST, and what a server does can depend on that: time.com pushes for a GET and not for
a POST. Without a method, it still is a POST.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… response

time.com pushes its fonts, and the client asserted in on_header_callback() on the first header field
of a pushed response: there are streams only for requests. With the assert compiled out, the next
line dereferences that null pointer. So any server could take down a client.

The client has no way to hand out a pushed response, so it now sends SETTINGS_ENABLE_PUSH=0. nghttp2
acts on that as soon as it is submitted, not only once the server has acknowledged it: a push before
the acknowledgement gets RST_STREAM(CANCEL), and one after it is a connection error, both without
going through on_header_callback(). on_begin_frame_callback() is what still gets to see one, so that
is where it is logged. It cannot tell what was promised.

A header field without a stream is now ignored instead of asserted on, though no test gets there any
more with push disabled.

The tests have a peer that writes its frames by hand, as one on top of nghttp2 refuses to push once
it has read the client's SETTINGS. nghttp2 version 2 has no such setting, and any push is a connection
error, so only that test runs in build-h2v2/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pgit
pgit merged commit 553ef56 into master Nov 3, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant