File tree Expand file tree Collapse file tree 1 file changed +22
-2
lines changed
Expand file tree Collapse file tree 1 file changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -121,8 +121,28 @@ class HTTPTracker extends Tracker {
121121 }
122122
123123 async _request ( requestUrl , params , cb ) {
124- const _parsedUrl = new URL ( requestUrl + ( requestUrl . indexOf ( '?' ) === - 1 ? '?' : '&' ) + common . querystringStringify ( params ) )
125- const parsedUrl = new URL ( _parsedUrl . toString ( ) )
124+ const parsedUrl = new URL (
125+ requestUrl +
126+ ( requestUrl . indexOf ( '?' ) === - 1 ? '?' : '&' ) +
127+ common . querystringStringify (
128+ Object . fromEntries (
129+ Object
130+ . entries ( params )
131+ . filter ( ( [ _ , value ] ) =>
132+ ! (
133+ value === undefined
134+ || value === null
135+ || value === ''
136+ || (
137+ typeof value === 'number'
138+ && isNaN ( value )
139+ )
140+ )
141+ )
142+ )
143+ )
144+ )
145+
126146 parsedUrl . searchParams . set (
127147 'info_hash' ,
128148 new URLSearchParams ( { info_hash : escape ( params . info_hash ) } )
You can’t perform that action at this time.
0 commit comments