Permalink
Browse files

Changed deprecated method http.createClient().

  • Loading branch information...
tsyd committed Sep 9, 2012
1 parent 7f05e02 commit 14de2398d32e87b7bb2e7cab0118321a760abb20
Showing with 2 additions and 4 deletions.
  1. +2 −4 lib/proxy-tamper.js
View
@@ -49,11 +49,9 @@ var ProxyTamper = function (options) {
return;
}
- proxy = http.createClient(80, req.headers['host']);
- proxyReq = proxy.request(req.method, req.url, req.headers);
-
- proxy.addListener('error', function (e) {});
+ proxyReq = http.request({'host': req.headers['host'], 'port': 80, 'path': req.url, 'method': req.method});
+ proxyReq.addListener('error', function (e) {});
proxyReq.addListener('response', function (proxyResp) {
proxyResp.addListener('data', function (chunk) { buffers.push(chunk); });
proxyResp.addListener('error', function (e) {});

0 comments on commit 14de239

Please sign in to comment.