FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

http2: make http2/compat.write more http/1 compliant by ronag · Pull Request #30964 · nodejs/node · GitHub

/ node Public

http2: make http2/compat.write more http/1 compliant - #30964

Closed
ronag wants to merge 4 commits into
nodejs:masterfrom
nxtedition:http2-compat-writable
Closed

http2: make http2/compat.write more http/1 compliant#30964
ronag wants to merge 4 commits into
nodejs:masterfrom
nxtedition:http2-compat-writable

Conversation

ronag commented Dec 14, 2019
edited
Loading

Copy link
Copy Markdown
Member

HTTP2ServerResponse.write would behave differently than both http1 and streams. This PR makes it more compliant with stream.Writable behaviour.

In particular, prior to this PR, write would throw err instead of calling destroy(err)

Refs: #29529

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

nodejs-github-bot added the http2 Issues or PRs related to the http2 subsystem. label Dec 14, 2019

ronag commented Dec 14, 2019

Copy link
Copy Markdown
Member Author

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.

ronag force-pushed the http2-compat-writable branch from 69f9a1d to dac542b Compare December 14, 2019 18:18

ronag commented Dec 14, 2019

Copy link
Copy Markdown
Member Author

Unsure about semver. Maybe major?

ronag changed the title http2: make HTTP2ServerResponse more streams compliant http2: make HTTP2ServerResponse.write more streams compliant Dec 14, 2019

addaleax left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I’m good with semver-patch

Copy link
Copy Markdown
Collaborator

apapirovski left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Comment thread lib/internal/http2/compat.js Outdated
Comment thread lib/internal/http2/compat.js Outdated
Comment thread lib/internal/http2/compat.js Outdated

ronag commented Dec 14, 2019

Copy link
Copy Markdown
Member Author

@apapirovski: I think you prefer to align with http1 instead of streams. I've updated the PR accordingly.

ronag force-pushed the http2-compat-writable branch from d1a706e to 1ef5224 Compare December 14, 2019 19:44
Comment thread lib/internal/http2/compat.js Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

My other outstanding question regarding closed stands. Might be good to get @jasnell @addaleax to weigh in too. Seems like this existing error is not in the spirit of compatibility which could cause people issues...

(Could also be left for a separate PR.)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

(It was mentioned in the linked issue, hence me bringing it up.)

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I'll leave this as is until there is more input.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I think the biggest issue was the throw.

Comment thread lib/internal/http2/compat.js Outdated
ronag force-pushed the http2-compat-writable branch from c8c1f00 to 19c30e7 Compare December 14, 2019 19:56
apapirovski dismissed their stale review December 14, 2019 20:54

change request was addressed, will approve after outstanding discussion is resolved

Copy link
Copy Markdown
Collaborator

Copy link
Copy Markdown
Collaborator

ronag changed the title http2: make HTTP2ServerResponse.write more streams compliant http2: make http2/compat.write more http/1 compliant Dec 15, 2019

Copy link
Copy Markdown
Member

I believe this is author-ready?

BridgeAR added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Dec 25, 2019
BridgeAR requested a review from jasnell December 25, 2019 10:38
BridgeAR removed the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Dec 25, 2019

Trott commented Dec 31, 2019

Copy link
Copy Markdown
Member

Needs a rebase.

ronag added 4 commits January 1, 2020 12:18
HTTP2ServerResponse.write would behave differently than
both http1 and streams. This PR makes it more compliant
with stream.Writable behaviour.

Refs: nodejs#29529

ronag commented Jan 1, 2020

Copy link
Copy Markdown
Member Author

rebased

ronag force-pushed the http2-compat-writable branch from 493c71a to 9da63be Compare January 1, 2020 11:20
BridgeAR added the author ready PRs that have at least one approval, no outstanding review comments, and a CI started. label Jan 1, 2020

nodejs-github-bot commented Jan 1, 2020
edited by BridgeAR
Loading

Copy link
Copy Markdown
Collaborator

BridgeAR pushed a commit that referenced this pull request Jan 1, 2020
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 <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>

BridgeAR commented Jan 1, 2020

Copy link
Copy Markdown
Member

Landed in a1d307f 🎉

BridgeAR closed this Jan 1, 2020
BridgeAR pushed a commit that referenced this pull request Jan 3, 2020
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 <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
BridgeAR mentioned this pull request Jan 7, 2020

targos commented Jan 14, 2020

Copy link
Copy Markdown
Member

This needs a backport or other previous PRs to be backported in order to land on v12.x-staging.

sxa pushed a commit to sxa/node that referenced this pull request Jan 21, 2020
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
sxa pushed a commit to sxa/node that referenced this pull request Jan 21, 2020
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
MylesBorins pushed a commit that referenced this pull request Jan 30, 2020
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 <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>
BethGriggs pushed a commit that referenced this pull request Feb 6, 2020
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 <anna@addaleax.net>
Reviewed-By: Rich Trott <rtrott@gmail.com>

FurChan commented Dec 4, 2020
edited
Loading

Copy link
Copy Markdown

This needs a backport or other previous PRs to be backported in order to land on v12.x-staging.

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.

``

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. http2 Issues or PRs related to the http2 subsystem.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants


Back | FazBrowse Home | New Git URL