From 6655e0164216449a97090651230266da8ced0150 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maciej=20Ma=C5=82ecki?= Date: Thu, 27 Oct 2011 19:36:05 +0200 Subject: [PATCH] [v0.6] Don't use `agent.appendMessage()` Instead, just perform a request. --- lib/node-http-proxy/http-proxy.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/node-http-proxy/http-proxy.js b/lib/node-http-proxy/http-proxy.js index 227948d..7ae8b6c 100644 --- a/lib/node-http-proxy/http-proxy.js +++ b/lib/node-http-proxy/http-proxy.js @@ -590,11 +590,12 @@ HttpProxy.prototype.proxyWebSocketRequest = function (req, socket, head, buffer) // outgoing.host = this.target.host; outgoing.port = this.target.port; + outgoing.agent = agent; outgoing.method = 'GET'; outgoing.path = req.url; outgoing.headers = req.headers; - var reverseProxy = agent.appendMessage(outgoing); + var reverseProxy = this.target.protocol.request(outgoing); // // On any errors from the `reverseProxy` emit the