Repository navigation
Conversation
This branch has not been deployed
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.
Fixes #6288
HttpProvidersetContent-Lengthto the JavaScript string length, which differs from the UTF-8 byte length for non-ASCII JSON. This can leave valid requests incomplete with Node's built-in fetch.Remove the provider-generated header so fetch calculates the length of its string body. Explicit user headers, JSON encoding, and HTTP/RPC error handling remain unchanged.
Add 10 real localhost HTTP regression cases covering ASCII, Hangul, accents, surrogate pairs, combining characters, empty text, custom headers, an explicit correct length, HTTP errors, and RPC errors.
Validation:
node .yarn/releases/yarn-4.6.0.cjs test:one rpc-provider: runner reports 134 passed, 0 failed, 1 existing skipped suite, with both native fetch andNODE_OPTIONS=--no-experimental-fetch.yarn build(including TypeScript project checks) and changed-file ESLint pass.The node-fetch fallback and browser paths already corrected/managed the header before this change. No live chain operations or full monorepo test run was used.