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

fix: premature end large body #805

Merged
merged 12 commits into from May 12, 2021
Merged

fix: premature end large body #805

merged 12 commits into from May 12, 2021

Conversation

ronag
Copy link
Member

@ronag ronag commented May 11, 2021

llhttp integer truncation on ARM platform.

Refs: #803
Refs: #429

@ronag ronag added this to the 4.0 milestone May 11, 2021
@ronag ronag requested review from mcollina and dnlup May 12, 2021 06:07
Copy link
Contributor

@dnlup dnlup left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome work, lgtm.

@dnlup
Copy link
Contributor

dnlup commented May 12, 2021

I think there's just some ts linting that is failing

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm with a nit

if (request.method !== 'HEAD' && contentLength && bytesRead !== parseInt(contentLength, 10)) {
util.destroy(socket, new ResponseContentLengthMismatchError())
return -1
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this ignored by istanbul? Can't we reproduce?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think llhttp doesn't actually allow it, i.e. it shouldn't be possible.

Copy link
Member Author

@ronag ronag May 12, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will have to dig into it further. Just to tired right now. Only slept 6 hours in total this week 😞 .

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please take some rest 🙏🏻

@ronag ronag merged commit cd78eb5 into main May 12, 2021
@Uzlopak Uzlopak deleted the large-body branch February 21, 2024 12:38
crysmags pushed a commit to crysmags/undici that referenced this pull request Feb 27, 2024
* fix: premature end large body

* fixup

* fixup

* fixup

* fixuP

* fixup

* fixup

* FIXUP

* fixup

* fixup

* fixup

* fixup
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.

None yet

3 participants