Closed someoneinatree closed 5 years ago
There are some other problems with mitm and node 10: https://github.com/assetgraph/assetgraph/pull/873
For now I have used nock because it supported the things I was doing and appears to work on node 10 (or at least without the above issue in my usecase...) but intrigued to the cause of this. I don't know the node core well enough to fix but any pointers to more info would be great.
Hey again! Should be fixed, but waiting on more confirmation in https://github.com/moll/node-mitm/issues/48. I'll close this issue in favor of that. ;)
I'm trying to use mitm to intercept a json post made by the request library, but on the latest node, I am getting a http_client error. I can tell mitm is somehow involved because if I comment out the Mitm initialization then that error disappears.
Error:
Not 100% sure this is mitm issue, seen it referenced in node core (https://github.com/nodejs/node/issues/21665). But after reading the issue conversation, I'm still not clear if this is something to be fixed their end or is a change to internals that we ("mitm") made assumptions about. Something to do with sockets or streams. Reproduction and error codes attached.
minimal test.js file to reproduce:
run with:
mocha test.js