diff --git a/lib/parse_http.js b/lib/parse_http.js index 0f7a775..85e3519 100644 --- a/lib/parse_http.js +++ b/lib/parse_http.js @@ -44,12 +44,10 @@ function parseHttpRequest (req, options) { if (params.info_hash) { if (!Array.isArray(params.info_hash)) throw new Error('invalid info_hash array') - params.info_hash = params.info_hash.map(function (infoHash) { + params.info_hash.forEach(function (infoHash) { if (infoHash.length !== 20) { throw new Error('invalid info_hash') } - - return infoHash }) }