hyperium / hyperium/h2

Automatically reset received push promises if push promises havee been disabled.

Open
#200 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
1.6k
Forks
382
Avg merge
20h 23m
Merged PRs (30d)
9

Description

Relevant spec:

This setting can be used to disable server push (Section 8.2). An endpoint MUST NOT send a PUSH_PROMISE frame if it receives this parameter set to a value of 0. An endpoint that has both set this parameter to 0 and had it acknowledged MUST treat the receipt of a PUSH_PROMISE frame as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.

The initial value is 1, which indicates that server push is permitted. Any value other than 0 or 1 MUST be treated as a connection error (Section 5.4.1) of type PROTOCOL_ERROR.

So, the issue is that the default value if "enabled", so the server can actually send push promises before the SETTINGS frame has been received.

The behavior should probably be:

  • If the SETTINGS frame that disabled push promises has been ACKed, then receiving a push promise results in a connection error of type PROTOCOL_ERROR.
  • If the SETTINGS frame that disabled push promises has been sent but not ACKed, received push promises are automatically reset.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the HTTP/2 SETTINGS handling and PUSH_PROMISE processing described in the issue, using the cited specification as the behavioral reference. Done means an acknowledged disabled setting makes PUSH_PROMISE a PROTOCOL_ERROR, while a sent but unacknowledged setting resets received push promises.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
networking
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.