mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-02-07 13:59:07 +00:00
Merge pull request #345 from webtorrent/fix-tests
This commit is contained in:
commit
5d119fdcf1
@ -3,9 +3,9 @@ var test = require('tape')
|
|||||||
|
|
||||||
// https://github.com/webtorrent/webtorrent/issues/196
|
// https://github.com/webtorrent/webtorrent/issues/196
|
||||||
test('encode special chars +* in http tracker urls', function (t) {
|
test('encode special chars +* in http tracker urls', function (t) {
|
||||||
var q = {
|
var q = Object.create(null)
|
||||||
info_hash: Buffer.from('a2a15537542b22925ad10486bf7a8b2a9c42f0d1', 'hex').toString('binary')
|
q.info_hash = Buffer.from('a2a15537542b22925ad10486bf7a8b2a9c42f0d1', 'hex').toString('binary')
|
||||||
}
|
|
||||||
var encoded = 'info_hash=%A2%A1U7T%2B%22%92Z%D1%04%86%BFz%8B%2A%9CB%F0%D1'
|
var encoded = 'info_hash=%A2%A1U7T%2B%22%92Z%D1%04%86%BFz%8B%2A%9CB%F0%D1'
|
||||||
t.equal(common.querystringStringify(q), encoded)
|
t.equal(common.querystringStringify(q), encoded)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user