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 issue when HTTP when no body is sent for POST #596

Closed
wants to merge 4 commits into from
Closed

Fix issue when HTTP when no body is sent for POST #596

wants to merge 4 commits into from

Conversation

Mark1626
Copy link
Contributor

Fixes #538

@@ -119,6 +119,30 @@ test(async function requestBodyWithContentLength(): Promise<void> {
}
});

test(async function requestBodyWithoutBody(): Promise<void> {
{
const server = Deno.run({
Copy link
Contributor Author

Choose a reason for hiding this comment

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

When a POST is send is without a body, promise waits indefinitely to read from connection.
The test written for #539 was unable to catch this, as it was an empty buffer rather than a connection.
So I'm starting a server to catch this.

@Mark1626
Copy link
Contributor Author

Referring #595 here as whichever gets merged will have to take note of the other

@Mark1626
Copy link
Contributor Author

\cc @ry

inverted-capital pushed a commit to dreamcatcher-tech/napps that referenced this pull request Oct 24, 2024
)

working towards denoland#524.

adds a couple custom assertion fns to have a predictable set to work
with.

---------

Co-authored-by: Asher Gomez <ashersaupingomez@gmail.com>
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.

[HTTP] Body's Promise is blocked when no body is present
3 participants