fix: backport safe main fixes to v7.x#5136
Merged
Merged
Conversation
Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> (cherry picked from commit 5334fa6)
) The condition in step 7 of fetchFinale checked `fetchParams.request.mode !== 'navigator'`, but 'navigator' is not a valid request mode — the spec value is 'navigate'. Because the typo never matched, the guarded block always ran, setting responseStatus and extracting the MIME type even for navigate-mode responses with cross-origin redirects, which the spec requires to be skipped. Signed-off-by: Nikita Skovoroda <chalkerx@gmail.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Nikita Skovoroda <chalkerx@gmail.com> (cherry picked from commit a6f8644)
The signed integer lower bound was computed as `Math.pow(-2, bitLength) - 1`, which evaluates to `(-2)^bitLength - 1` instead of the spec-required `-2^(bitLength - 1)`. The step 11 overflow threshold similarly used `2^bitLength - 1` instead of `2^(bitLength - 1)`, causing values in `[2^(bitLength-1), 2^bitLength - 2]` to skip the signed wrap. Fix both expressions and update the surrounding comments to match the WebIDL spec. Signed-off-by: Nikita Skovoroda <chalkerx@gmail.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Nikita Skovoroda <chalkerx@gmail.com> (cherry picked from commit d2e8178)
(cherry picked from commit ece771c)
The `#deleteOldValuesQuery` used `ORDER BY cachedAt DESC` which deleted the most recently cached entries instead of the oldest ones, inverting the intended LRU-style eviction policy. Switch to `ASC` so that pruning removes the oldest entries as expected. Signed-off-by: Nikita Skovoroda <chalkerx@gmail.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Nikita Skovoroda <chalkerx@gmail.com> (cherry picked from commit e0e61d3)
The previous implementation used `doubleColonIndex / 3` to map the character offset of '::' to a parts-array index, which only works when every group before '::' is exactly three characters wide. For typical addresses like `2001:db8::1` or `fe80::1` the zero-fill gap was never applied, producing a wrong 16-byte buffer and, in a SOCKS5 proxy context, connections to unintended destinations. Rewrite parseIPv6 to split around '::' and write the trailing groups at their correct offsets from the end of the buffer. Signed-off-by: Nikita Skovoroda <chalkerx@gmail.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Nikita Skovoroda <chalkerx@gmail.com> (cherry picked from commit 838053d)
(cherry picked from commit c8d50b4)
(cherry picked from commit e1211a5)
) (cherry picked from commit f6c5dda)
…5081) makeCacheKey used pathHasQueryOrFragment(opts.path) to decide whether to merge opts.query into the cached path, but opts.path can be undefined when a caller supplies only origin+query at dispatch time. In that case the check threw TypeError ("Cannot read properties of undefined (reading 'includes')"), so the query was never folded into the cache key and requests with differing queries could collide or the key construction itself could fail. Check the already-defaulted fullPath ('/' when opts.path is missing) instead, so the query is consistently serialised into key.path and different query strings get separate cache entries regardless of how path is supplied. Refs #4209 Signed-off-by: Maruthan G <maruthang4@gmail.com> (cherry picked from commit 1f57375)
…5045) `makeFilterCalls` returned an arrow function whose `this` cannot be rebound by `.call()`, so `handler.call({ logs: store }, criteria)` in `handleFilterCallsWithOptions` always filtered against the full `this.logs` instead of the narrowed `store`, causing AND to behave like OR. Pass the source logs explicitly to the filter helpers and seed the store with `this.logs` for AND so each criterion narrows the previous result. Signed-off-by: Nikita Skovoroda <chalkerx@gmail.com> Co-authored-by: Claude <noreply@anthropic.com> Co-authored-by: Nikita Skovoroda <chalkerx@gmail.com> (cherry picked from commit 2a6f9c7)
(cherry picked from commit 67ca48c)
Assisted-by: openai:gpt-5.4 Signed-off-by: Kamat, Trivikram <16024985+trivikr@users.noreply.github.com> (cherry picked from commit 754a3d3)
(cherry picked from commit ead8a6b)
(cherry picked from commit 74e8706)
(cherry picked from commit 2eb9ddc)
Signed-off-by: Matteo Collina <hello@matteocollina.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v7.x #5136 +/- ##
==========================================
+ Coverage 92.85% 92.87% +0.02%
==========================================
Files 112 112
Lines 35740 35785 +45
==========================================
+ Hits 33185 33236 +51
+ Misses 2555 2549 -6 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Signed-off-by: Matteo Collina <hello@matteocollina.com>
KhafraDev
approved these changes
Apr 28, 2026
Merged
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.
Summary
Backport a set of low-risk fixes from
maintov7.x.This includes fixes for:
Also includes one small
v7.x-specific follow-up commit to preserveallowH2when wrapping a customconnectfunction, which was needed to keep the backportedH2CClientfix working on thev7.xbranch layout.Testing
npm run test./node_modules/.bin/borp --timeout 180000 -p "test/h2c-client.js"