moll / node-mitm

Intercept and mock outgoing Node.js network TCP connections and HTTP requests for testing. Intercepts and gives you a Net.Socket, Http.IncomingMessage and Http.ServerResponse to test and respond with. Super useful when testing code that hits remote servers.
Other
637 stars 48 forks source link

Wire up internals for node.js 9.6.0+ compatibility #49

Closed papandreou closed 5 years ago

papandreou commented 6 years ago

Fixes #48

This feels quite hackish, but I couldn't find another way to make it work except for PRing node.js core. It kinda feels like this line should also have checked for parser.socket.server[kIncomingMessage]: https://github.com/nodejs/node/blob/15e41a9951c425913c43073ba5f6af04c0867715/lib/_http_common.js#L78 -- but even that would only get us halfway there.

papandreou commented 6 years ago

Ping @moll, I think we might get a bunch of requests for this soon.

In the mean time, I've published my mitm-papandreou fork with this change (1.3.3-patch4).

tulios commented 6 years ago

Can you merge this?

papandreou commented 6 years ago

@moll, still there? :)