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

Streaming input #317

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Streaming input #317

wants to merge 7 commits into from

Conversation

mcollina
Copy link
Member

@mcollina mcollina commented Dec 3, 2024

This PR does two things:

  1. if a stream is provided as the body of the request, it does not accumulate it anymore but forward it respecting backpressure instead.
  2. fix an old incosistency with non-fake servers that had a response being sent even if the dispatched handler aborted

Checklist

Signed-off-by: Matteo Collina <[email protected]>
Signed-off-by: Matteo Collina <[email protected]>
Signed-off-by: Matteo Collina <[email protected]>
index.js Show resolved Hide resolved
}
{
const payload = this._lightMyRequest.payload
if (payload && payload._readableState) { // does not quack like a stream

Choose a reason for hiding this comment

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

I think you mean "quacks like a stream" here :)

Copy link
Member

Choose a reason for hiding this comment

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

I would just fix this comment.

Copy link

@ShogunPanda ShogunPanda left a comment

Choose a reason for hiding this comment

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

Small nits, but LGTM!

@mcollina mcollina requested a review from a team December 18, 2024 17:36
@mcollina
Copy link
Member Author

@fastify/libraries I need another review

Signed-off-by: Matteo Collina <[email protected]>
}
{
const payload = this._lightMyRequest.payload
if (payload && payload._readableState) { // does not quack like a stream
Copy link
Member

Choose a reason for hiding this comment

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

I would just fix this comment.

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.

3 participants