Skip to content

Conversation

@ronag
Copy link
Member

@ronagronag commented Jul 16, 2019

This is another take on #15404 (comment).

Depends on #28681

Refs: #15029

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-botnodejs-github-bot added the http Issues or PRs related to the http subsystem. label Jul 16, 2019
@ronag
Copy link
MemberAuthor

ronag commented Jul 16, 2019

@mcollina as far as I understand the problem with the original fix (and probably this one) in #14024 causes regression in ecosystem. Are there test for that? How do I run those myself?

Copy link
Member

@mcollinamcollina left a comment

Choose a reason for hiding this comment

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

I'm -1 to adding _writableState property to OutgoingMessage.

@mcollina
Copy link
Member

@ronag this was it: https://github.com/SimenB/node-stream-repro/blob/master/index.js.

Essentially that writable property underpins both pump and pipeline.

@ronag
Copy link
MemberAuthor

ronag commented Jul 16, 2019

@mcollina I've added a test. Assuming pipeline is pretty much the same as pump? this should work. Basically by adding a _writableState we can "fool" pipeline and eos to treat it differently/correctly.

@ronagronagforce-pushed the writable-finished branch 3 times, most recently from 5d1e99e to 236a814CompareJuly 16, 2019 15:17
@mcollina
Copy link
Member

I've added a test. Assuming pipeline is pretty much the same as pump? this should work. Basically by adding a _writableState we can "fool" pipeline and eos to treat it differently/correctly.

I'm not convinced with this approach, adding a fake proxy is definitely going to break other things.

@ronag
Copy link
MemberAuthor

I'm not convinced with this approach, adding a fake proxy is definitely going to break other things.

Not much I can do with that. Is there any chance I can take a look at "other things" or is it too ambitious? Otherwise I guess this PR is closable.

@ronagronagforce-pushed the writable-finished branch 3 times, most recently from 26b6e88 to 6125ffeCompareJuly 16, 2019 15:27
@ronagronagforce-pushed the writable-finished branch from 6125ffe to 72d2772CompareJuly 16, 2019 15:28
@ronag
Copy link
MemberAuthor

This PR needs more work. However, if the idea of implementing _writableState to resolve the original issue is a no go I won't put further effort into this.

@jasnelljasnell added the wip Issues and PRs that are still a work in progress. label Jul 17, 2019
@ronag
Copy link
MemberAuthor

I don't remember what this is about anymore. Will get back to it in there future.

@ronagronag closed this Aug 12, 2019
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

httpIssues or PRs related to the http subsystem.wipIssues and PRs that are still a work in progress.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

@ronag@mcollina@vsemozhetbyt@jasnell@nodejs-github-bot