Merge pull request #151 from github/node-updates
Update all node packages
This commit is contained in:
Коммит
3bfe4fe11b
|
@ -1806,7 +1806,7 @@ class HttpClient {
|
|||
if (this._keepAlive && useProxy) {
|
||||
agent = this._proxyAgent;
|
||||
}
|
||||
if (this._keepAlive && !useProxy) {
|
||||
if (!useProxy) {
|
||||
agent = this._agent;
|
||||
}
|
||||
// if agent is already assigned use that agent.
|
||||
|
@ -1838,16 +1838,12 @@ class HttpClient {
|
|||
agent = tunnelAgent(agentOptions);
|
||||
this._proxyAgent = agent;
|
||||
}
|
||||
// if reusing agent across request and tunneling agent isn't assigned create a new agent
|
||||
if (this._keepAlive && !agent) {
|
||||
// if tunneling agent isn't assigned create a new agent
|
||||
if (!agent) {
|
||||
const options = { keepAlive: this._keepAlive, maxSockets };
|
||||
agent = usingSsl ? new https.Agent(options) : new http.Agent(options);
|
||||
this._agent = agent;
|
||||
}
|
||||
// if not using private agent and tunnel agent isn't setup then use global agent
|
||||
if (!agent) {
|
||||
agent = usingSsl ? https.globalAgent : http.globalAgent;
|
||||
}
|
||||
if (usingSsl && this._ignoreSslError) {
|
||||
// we don't want to set NODE_TLS_REJECT_UNAUTHORIZED=0 since that will affect request for entire process
|
||||
// http.RequestOptions doesn't expose a way to modify RequestOptions.agent.options
|
||||
|
@ -36261,7 +36257,7 @@ Dicer.prototype._write = function (data, encoding, cb) {
|
|||
if (this._headerFirst && this._isPreamble) {
|
||||
if (!this._part) {
|
||||
this._part = new PartStream(this._partOpts)
|
||||
if (this._events.preamble) { this.emit('preamble', this._part) } else { this._ignore() }
|
||||
if (this.listenerCount('preamble') !== 0) { this.emit('preamble', this._part) } else { this._ignore() }
|
||||
}
|
||||
const r = this._hparser.push(data)
|
||||
if (!this._inHeader && r !== undefined && r < data.length) { data = data.slice(r) } else { return cb() }
|
||||
|
@ -36318,7 +36314,7 @@ Dicer.prototype._oninfo = function (isMatch, data, start, end) {
|
|||
}
|
||||
}
|
||||
if (this._dashes === 2) {
|
||||
if ((start + i) < end && this._events.trailer) { this.emit('trailer', data.slice(start + i, end)) }
|
||||
if ((start + i) < end && this.listenerCount('trailer') !== 0) { this.emit('trailer', data.slice(start + i, end)) }
|
||||
this.reset()
|
||||
this._finished = true
|
||||
// no more parts will be added
|
||||
|
@ -36336,7 +36332,13 @@ Dicer.prototype._oninfo = function (isMatch, data, start, end) {
|
|||
this._part._read = function (n) {
|
||||
self._unpause()
|
||||
}
|
||||
if (this._isPreamble && this._events.preamble) { this.emit('preamble', this._part) } else if (this._isPreamble !== true && this._events.part) { this.emit('part', this._part) } else { this._ignore() }
|
||||
if (this._isPreamble && this.listenerCount('preamble') !== 0) {
|
||||
this.emit('preamble', this._part)
|
||||
} else if (this._isPreamble !== true && this.listenerCount('part') !== 0) {
|
||||
this.emit('part', this._part)
|
||||
} else {
|
||||
this._ignore()
|
||||
}
|
||||
if (!this._isPreamble) { this._inHeader = true }
|
||||
}
|
||||
if (data && start < end && !this._ignoreData) {
|
||||
|
@ -37019,7 +37021,7 @@ function Multipart (boy, cfg) {
|
|||
|
||||
++nfiles
|
||||
|
||||
if (!boy._events.file) {
|
||||
if (boy.listenerCount('file') === 0) {
|
||||
self.parser._ignore()
|
||||
return
|
||||
}
|
||||
|
@ -37548,7 +37550,7 @@ const decoders = {
|
|||
if (textDecoders.has(this.toString())) {
|
||||
try {
|
||||
return textDecoders.get(this).decode(data)
|
||||
} catch (e) { }
|
||||
} catch {}
|
||||
}
|
||||
return typeof data === 'string'
|
||||
? data
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче