Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#1576] Fixes unexpected premature close on chunked responses #1687

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Treverix
Copy link

@Treverix Treverix commented Dec 5, 2022

Purpose

Fixes #1576 (unexpected premature close errors on chunked responses)

Changes

It corrects a false assumption about split of the 'LAST CHUNK' marker between the previous and current buffer. The new solution concatenates last bytes of the previous buffer with all bytes from the current buffer (if that holds less then 5 bytes) and does the check on that.

Additional information


  • I updated readme
  • I added unit test(s)

@xfournet
Copy link

This PR should be merged. We suffer the same problem, and this patch fixed it. It must be released in npm (3.x.x and 2.x.x), thanks!

@marcesengel
Copy link

@LinusU would you maybe be so kind to assign other reviewers in case you don't have the time right now?

@TatyanaA-PH
Copy link

+1

@newhouse
Copy link

newhouse commented Dec 8, 2023

bump...kinda a big deal, this problem

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.

Getting Premature close errors unexpectedly but very reliably in specific circumstances
6 participants