Browse Source

fix: SimpleURLLoaderWrapper redirects (#21630)

Lutz Roeder 5 years ago
parent
commit
ed6a3877a4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      lib/browser/api/net.js

+ 1 - 1
lib/browser/api/net.js

@@ -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'))
           }
         }