Thursday 12 April 2018

HTTP/1.1 400 when piping with netcat

I am trying to create a stream parser, but I have encountered a problem. My setup: generator.js - outputs a random string in stdout every second sender.js - accepts a stream on port 9998 and sends it using http to listener.js on port 9999 listener.js - accepts a stream via http on port 9999 and outputs it to stdout Using only core modules - net, fs, http.The problem: When I pipe node generator.js | nc localhost I get HTTP/1.1 400 Bad Request.What might the problem be?

Submitted April 12, 2018 at 07:58AM by bilporti

No comments:

Post a Comment