Skip to content

feat: env vars that shape the client's first SETTINGS frame for impit - #6

Merged
barjin merged 2 commits into
apify:masterfrom
jackc625:feat/impit-settings
Nov 11, 2026
Merged

barjin merged 2 commits into
apify:masterfrom
jackc625:feat/impit-settings

Conversation

@jackc625

Copy link
Copy Markdown

Lets impit send the same HTTP/2 SETTINGS as real browsers, with two env vars in the style of IMPIT_H2_PSEUDOHEADERS_ORDER: IMPIT_H2_OMIT_SETTINGS leaves settings 2, 5 or 6 out of the client's first SETTINGS frame, and IMPIT_H2_NO_RFC7540_PRIORITIES adds setting 9. Only the frame changes (h2 keeps its own limits), and nothing changes when they're unset. With ENABLE_PUSH left out, a pushed stream is refused instead of closing the connection; refusals count toward the local-reset limit, as upstream's own do. The fork-only code is in src/impit_settings.rs.

It also carries hyperium#932, without which the tests don't build on current Rust. For apify/impit#588 (comment).

ArniDagur and others added 2 commits October 26, 2026 16:19
Problem

Recent Rust toolchains deprecate the std::usize and std::u32 modules. The test suite fails to compile when CI promotes deprecation warnings to errors.

Solution

Use primitive associated constants directly and remove the deprecated std::usize module import.

Validation

Checked all h2-tests targets with warnings denied.
`IMPIT_H2_OMIT_SETTINGS` leaves ENABLE_PUSH, MAX_FRAME_SIZE or
MAX_HEADER_LIST_SIZE (ids 2, 5, 6; other ids are ignored) out of the
client's first SETTINGS frame, and `IMPIT_H2_NO_RFC7540_PRIORITIES=0|1`
adds setting 9 (RFC 9218). Only the frame on the wire changes: h2 keeps
enforcing the builder's settings.

With ENABLE_PUSH left out, a PUSH_PROMISE is refused with RST_STREAM
REFUSED_STREAM (RFC 9113 §8.4.2) instead of closing the connection.
Refusals count toward the local-reset limit, as upstream counts its own.

Nothing changes when neither variable is set. The fork-only logic is in
`src/impit_settings.rs`.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-27T01:10:05.750040Z
We couldn’t complete this review. Comment @codex review to try again.
4307045 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@barjin
barjin merged commit 7d1c54a into apify:master Nov 11, 2026
6 checks passed
@jackc625
jackc625 deleted the feat/impit-settings branch November 12, 2026 17:08
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.

3 participants