-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
http2: make http2/compat.write more http/1 compliant #30964
Conversation
Would be nice to eventually consolidate stream, http1, http/2 compat and http/2 in terms of the streams API & behaviours. |
This comment has been minimized.
This comment has been minimized.
69f9a1d
to
dac542b
Compare
Unsure about semver. Maybe major? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I’m good with semver-patch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think ERR_STREAM_DESTROYED
belongs here. Also left some nits but that's the primary objection for me.
Would also like James to review ideally.
@apapirovski: I think you prefer to align with http1 instead of streams. I've updated the PR accordingly. |
d1a706e
to
1ef5224
Compare
lib/internal/http2/compat.js
Outdated
this.destroy(err); | ||
return; | ||
return false; | ||
} else if (this[kState].closed) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(It was mentioned in the linked issue, hence me bringing it up.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll leave this as is until there is more input.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the biggest issue was the throw
.
c8c1f00
to
19c30e7
Compare
change request was addressed, will approve after outstanding discussion is resolved
I believe this is |
Needs a rebase. |
HTTP2ServerResponse.write would behave differently than both http1 and streams. This PR makes it more compliant with stream.Writable behaviour. Refs: nodejs#29529
rebased |
493c71a
to
9da63be
Compare
HTTP2ServerResponse.write would behave differently than both http1 and streams. This PR makes it more compliant with stream.Writable behaviour. PR-URL: #30964 Refs: #29529 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
Landed in a1d307f 🎉 |
HTTP2ServerResponse.write would behave differently than both http1 and streams. This PR makes it more compliant with stream.Writable behaviour. PR-URL: #30964 Refs: #29529 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
This needs a backport or other previous PRs to be backported in order to land on v12.x-staging. |
HTTP2ServerResponse.write would behave differently than both http1 and streams. This PR makes it more compliant with stream.Writable behaviour. PR-URL: nodejs#30964 Refs: nodejs#29529
HTTP2ServerResponse.write would behave differently than both http1 and streams. This PR makes it more compliant with stream.Writable behaviour. PR-URL: nodejs#30964 Refs: nodejs#29529 Backport-PR-URL: nodejs#31444
HTTP2ServerResponse.write would behave differently than both http1 and streams. This PR makes it more compliant with stream.Writable behaviour. Backport-PR-URL: #31444 PR-URL: #30964 Refs: #29529 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
HTTP2ServerResponse.write would behave differently than both http1 and streams. This PR makes it more compliant with stream.Writable behaviour. Backport-PR-URL: #31444 PR-URL: #30964 Refs: #29529 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
This issue is still present on 12.20.0. I think the backported-to-v12.x tag might be misapplied here, or the fix was not sufficient. `` |
HTTP2ServerResponse.write
would behave differently than both http1 and streams. This PR makes it more compliant withstream.Writable
behaviour.In particular, prior to this PR,
write
wouldthrow err
instead of callingdestroy(err)
Refs: #29529
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes