lib/httpServer/transports/http/proxy.js
function proxy(req, endpoint) {
	var source = req.connection;
	var target;

	source.pause();

	target = net.connect(endpoint, function proxyHandler() {
		// the header has already been consumed, so we must recreate it and send it first

		target.write(recreateRequestHeader(req));

		target.pipe(source);
		source.pipe(target);

		source.resume();
	});

	target.setTimeout(0);
	target.setNoDelay(true);
	target.setKeepAlive(true, 0);

	return target;
}
function proxy(req, endpoint) {
	var source = req.connection;
	var target;

	source.pause();

	target = net.connect(endpoint, function proxyHandler() {
		// the header has already been consumed, so we must recreate it and send it first

		target.write(recreateRequestHeader(req));

		target.pipe(source);
		source.pipe(target);

		source.resume();
	});

	target.setTimeout(0);
	target.setNoDelay(true);
	target.setKeepAlive(true, 0);

	return target;
}
function proxy ( req , endpoint ) { var source = req . connection ; var target ; source . pause ( ) ; target = net . connect ( endpoint , function proxyHandler ( ) { // the header has already been consumed, so we must recreate it and send it first target . write ( recreateRequestHeader ( req ) ) ; target . pipe ( source ) ; source . pipe ( target ) ; source . resume ( ) ; } ) ; target . setTimeout ( 0 ) ; target . setNoDelay ( true ) ; target . setKeepAlive ( true , 0 ) ; return target ; }
A proxy function to route connections from one HTTP server to another

@param {Object} req  The HTTP client request.
A proxy function to route connections from one HTTP server to another