mirror of
https://github.com/webtorrent/bittorrent-tracker.git
synced 2025-01-31 02:21:36 +00:00
use correct API signature in querystring methods
This commit is contained in:
parent
e771c0f57e
commit
714400abae
@ -52,7 +52,7 @@ exports.toUInt32 = toUInt32
|
||||
* @return {Object}
|
||||
*/
|
||||
exports.querystringParse = function (q) {
|
||||
return querystring.parse(q, { decodeURIComponent: unescape })
|
||||
return querystring.parse(q, null, null, { decodeURIComponent: unescape })
|
||||
}
|
||||
|
||||
/**
|
||||
@ -62,7 +62,7 @@ exports.querystringParse = function (q) {
|
||||
* @return {string}
|
||||
*/
|
||||
exports.querystringStringify = function (obj) {
|
||||
var ret = querystring.stringify(obj, { encodeURIComponent: escape })
|
||||
var ret = querystring.stringify(obj, null, null, { encodeURIComponent: escape })
|
||||
ret = ret.replace(/[@*/+]/g, function (char) {
|
||||
// `escape` doesn't encode the characters @*/+ so we do it manually
|
||||
return '%' + char.charCodeAt(0).toString(16).toUpperCase()
|
||||
|
Loading…
Reference in New Issue
Block a user