File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -352,8 +352,8 @@ Server.prototype._onRequest = function (req, res) {
352352 var port = Number ( params . port )
353353 var addr = ip + ':' + port
354354
355- var infoHash = bytewiseDecodeURIComponent ( params . info_hash )
356- var peerId = bytewiseDecodeURIComponent ( params . peer_id )
355+ var infoHash = bytewiseDecodeURIComponent ( params . info_hash ) . toString ( 'hex' )
356+ var peerId = bytewiseDecodeURIComponent ( params . peer_id ) . toString ( 'utf8' )
357357
358358 var swarm = self . torrents [ infoHash ]
359359 if ( ! swarm ) {
@@ -494,5 +494,5 @@ function bytewiseEncodeURIComponent (buf) {
494494}
495495
496496function bytewiseDecodeURIComponent ( str ) {
497- return ( new Buffer ( decodeURIComponent ( str ) , 'binary' ) . toString ( 'hex' ) )
497+ return new Buffer ( decodeURIComponent ( str ) , 'binary' )
498498}
You can’t perform that action at this time.
0 commit comments