Skip to content

Commit

Permalink
fix: fix infinite recursion during some redirects (#2)
Browse files Browse the repository at this point in the history

Co-authored-by: Zach Bloomquist <[email protected]>
  • Loading branch information
kuceb and flotwig committed Nov 15, 2019
1 parent 2ccf237 commit 8afbb25
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions request.js
Original file line number Diff line number Diff line change
Expand Up @@ -991,6 +991,7 @@ Request.prototype.onRequestResponse = function (response) {
// Hack to emit end on close because of a core bug that never fires end
response.on('close', function () {
if (!self._ended) {
self._ended = true
self.response.emit('end')
}
})
Expand Down

0 comments on commit 8afbb25

Please sign in to comment.