node-mitm icon indicating copy to clipboard operation
node-mitm copied to clipboard

http response writeable stream not ending when used in pipeline (node >= 11.1.0)

Open kevinmstephens opened this issue 5 years ago • 2 comments

We are seeing an issue with MITM involving:

  • HTTPS requests (does not impact HTTP)
  • Starting in Node 11.1 and continuing to current Node 14 (11.0.0 and prior works fine)

When we use the http response writeable stream provided by MITM in the nodejs internal streams pipeline method the pipeline callback is never invoked.

We have created a repo with an implementation and tests showing the problem. If you run yarn test with node v11.0.0 the tests will pass, if you run with v11.1.1 they will timeout.

https://github.com/FormidableLabs/mitm-experiments

The callback not invoked that should be is here: https://github.com/FormidableLabs/mitm-experiments/blob/main/index.js#L126

Thanks for your help!

kevinmstephens avatar Jul 10 '20 22:07 kevinmstephens

Hey,

Thanks for the report. I'll see what I can find out!

moll avatar Jul 15 '20 09:07 moll

Hi @moll . Any updates on this?

Burnett2k avatar Apr 15 '21 18:04 Burnett2k