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: end response stream on mocked 204 responses #37

Merged
merged 1 commit into from
Nov 26, 2023
Merged

fix: end response stream on mocked 204 responses #37

merged 1 commit into from
Nov 26, 2023

Conversation

pacop
Copy link
Contributor

@pacop pacop commented Nov 25, 2023

When returning 204 (no content) express handler would hang forever. The response was not being closed when no content was emitted. Now, the response is ended if no content is provided.

A new test has been added, without the patch the test fails.

When returning 204 (no content) express handle would hang forever. The
response was not being closed when no content was emitted. Now the
response is ended if no content is provided.
Copy link
Member

@kettanaito kettanaito left a comment

Choose a reason for hiding this comment

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

Fantastic find. Thank you, @pacop!

@kettanaito kettanaito changed the title fixes 204 httpresponse fix: end response stream on mocked 204 responses Nov 26, 2023
@kettanaito kettanaito merged commit 9e8ceb4 into mswjs:main Nov 26, 2023
1 check passed
@kettanaito
Copy link
Member

Released: v0.9.2 🎉

This has been released in v0.9.2!

Make sure to always update to the latest version (npm i @mswjs/http-middleware@latest) to get the newest features and bug fixes.


Predictable release automation by @ossjs/release.

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.

2 participants