From e1b7fa7e5c93a823df8ac265b64b00e557af42e1 Mon Sep 17 00:00:00 2001 From: Astro Date: Wed, 4 Feb 2015 20:34:46 +0100 Subject: [PATCH] server: save HTTP req/res in params For GH issue #58 --- server.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/server.js b/server.js index f3964e8..07fcad8 100644 --- a/server.js +++ b/server.js @@ -127,6 +127,8 @@ Server.prototype.onHttpRequest = function (req, res) { var params try { params = parseHttpRequest(req, { trustProxy: self._trustProxy }) + params.httpReq = req + params.httpRes = res } catch (err) { debug('sent error %s', err.message) res.end(bencode.encode({