server: save HTTP req/res in params

For GH issue #58
This commit is contained in:
Astro 2015-02-04 20:34:46 +01:00
parent 73ef97239b
commit e1b7fa7e5c

View File

@ -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({