GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||
GeezerVison is showing github.com — http: compute body chunk length from decoded bytes by ShogunPanda · Pull Request #67615 · nodejs/node Conversation
Contributor
This decodes such strings to a Buffer first, in AI-assisted work. All changes reviewed by a human.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsConvert base64, base64url and hex strings to a Buffer before computing the chunk length, so the announced length matches the bytes written even when the input contains characters skipped while decoding. Assisted-By: OpenAI GPT-5.6 Sol <openai/gpt-5.6-sol> Signed-off-by: Paolo Insogna <[email protected]>
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@ ## main #67615 +/- ## ========================================== - Coverage 90.72% 90.71% -0.02% ========================================== Files 801 801 Lines 280809 280831 +22 Branches 54212 54217 +5 ========================================== - Hits 254776 254753 -23 - Misses 16209 16244 +35 - Partials 9824 9834 +10
🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| // invalid pair). | ||
| function decodeLossyEncodedChunk(chunk, encoding) { | ||
| if (typeof chunk === 'string' && typeof encoding === 'string') { | ||
| switch (encoding.toLowerCase()) { |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
We have a normalizeEncoding method in internal/util. Would that be better?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
that supports more than just base64, base64url, and hex. Likely best to keep this more limited set here.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Landed in 4da7a4b |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Convert base64, base64url and hex strings to a Buffer before computing the chunk length, so the announced length matches the bytes written even when the input contains characters skipped while decoding. Assisted-By: OpenAI GPT-5.6 Sol <openai/gpt-5.6-sol> Signed-off-by: Paolo Insogna <[email protected]> PR-URL: #67615 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ethan Arrowood <[email protected]>
Convert base64, base64url and hex strings to a Buffer before computing the chunk length, so the announced length matches the bytes written even when the input contains characters skipped while decoding. Assisted-By: OpenAI GPT-5.6 Sol <openai/gpt-5.6-sol> Signed-off-by: Paolo Insogna <[email protected]> PR-URL: nodejs#67615 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Ethan Arrowood <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.