fix: SimpleURLLoaderWrapper redirects (#21566) (#21645)

This commit is contained in:
trop[bot]
2020-01-01 09:32:26 +09:00
committed by Cheng Zhao
parent bef0dd868b
commit a889ec7957

View File

@@ -398,7 +398,7 @@ class ClientRequest extends Writable {
this.emit('redirect', statusCode, newMethod, newUrl, headers)
} finally {
this._followRedirectCb = null
if (!_followRedirect) {
if (!_followRedirect && !this._aborted) {
this._die(new Error('Redirect was cancelled'))
}
}