Skip to content

Commit e1b7fa7

Browse files
committed
server: save HTTP req/res in params
For GH issue webtorrent#58
1 parent 73ef972 commit e1b7fa7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

server.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,8 @@ Server.prototype.onHttpRequest = function (req, res) {
127127
var params
128128
try {
129129
params = parseHttpRequest(req, { trustProxy: self._trustProxy })
130+
params.httpReq = req
131+
params.httpRes = res
130132
} catch (err) {
131133
debug('sent error %s', err.message)
132134
res.end(bencode.encode({

0 commit comments

Comments
 (0)