Repository navigation
feat: env vars that shape the client's first SETTINGS frame for impit - #6
Merged
Merged
Conversation
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>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
barjin
approved these changes
Nov 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_SETTINGSleaves settings 2, 5 or 6 out of the client's first SETTINGS frame, andIMPIT_H2_NO_RFC7540_PRIORITIESadds 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 insrc/impit_settings.rs.It also carries hyperium#932, without which the tests don't build on current Rust. For apify/impit#588 (comment).