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(ext/flash) Fix panic when JS caller doesn't consume request body #16173

Merged

Conversation

tsar-boomba
Copy link
Contributor

@tsar-boomba tsar-boomba commented Oct 6, 2022

Fixes #15934, #15759, #15813

If the JS handler gets a POST, PUT, or PATCH request, but doesn't await the body, deno would panic because it will try to read the body even though the request has already been handled.

Not sure how/where to test this case, so I could use some help with that.

@CLAassistant
Copy link

CLAassistant commented Oct 6, 2022

CLA assistant check
All committers have signed the CLA.

ext/flash/lib.rs Outdated Show resolved Hide resolved
@bartlomieju
Copy link
Member

@littledivy please take a look

@bartlomieju bartlomieju added this to the 1.27 milestone Oct 22, 2022
@bartlomieju bartlomieju removed this from the 1.27 milestone Oct 26, 2022
@ynwd
Copy link

ynwd commented Nov 5, 2022

any updates?

Copy link
Member

@littledivy littledivy left a comment

Choose a reason for hiding this comment

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

LGTM!

@littledivy littledivy enabled auto-merge (squash) January 15, 2023 04:43
@littledivy littledivy enabled auto-merge (squash) January 15, 2023 04:43
@littledivy littledivy enabled auto-merge (squash) January 15, 2023 04:45
@littledivy littledivy merged commit 9830ae8 into denoland:main Jan 15, 2023
bartlomieju pushed a commit that referenced this pull request Jan 16, 2023
…#16173)



If the JS handler gets a POST, PUT, or PATCH request, but doesn't
`await` the body, deno would panic because it will try to read the body
even though the request has already been handled.

Not sure how/where to test this case, so I could use some help with
that.
@tsar-boomba tsar-boomba deleted the fix-panic-when-body-not-consumed branch March 25, 2023 19:38
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.

[Flash] Deno has panicked when POST & PUT
5 participants