We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fce9bd8 commit cecb778Copy full SHA for cecb778
test/querystring.js
@@ -3,9 +3,9 @@ var test = require('tape')
3
4
// https://github.com/webtorrent/webtorrent/issues/196
5
test('encode special chars +* in http tracker urls', function (t) {
6
- var q = {
7
- info_hash: Buffer.from('a2a15537542b22925ad10486bf7a8b2a9c42f0d1', 'hex').toString('binary')
8
- }
+ var q = Object.create(null)
+ q.info_hash = Buffer.from('a2a15537542b22925ad10486bf7a8b2a9c42f0d1', 'hex').toString('binary')
+
9
var encoded = 'info_hash=%A2%A1U7T%2B%22%92Z%D1%04%86%BFz%8B%2A%9CB%F0%D1'
10
t.equal(common.querystringStringify(q), encoded)
11
0 commit comments