Skip to content
This repository has been archived by the owner on Dec 16, 2024. It is now read-only.

Commit

Permalink
Fix infinite recursion during some redirects
Browse files Browse the repository at this point in the history
Cherry-pick 8afbb25

Co-authored-by: Zach Bloomquist <[email protected]>
  • Loading branch information
2 people authored and kevinvanrijn committed Sep 24, 2024
1 parent b996f35 commit e202e96
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 @@ -1374,6 +1374,7 @@ Request.prototype.onRequestResponse = function (response) {
// Hack to emit end on close because of a core bug that never fires end
response.once('close', function () {
if (!self._ended) {
self._ended = true
self.response.emit('end')
}
})
Expand Down

0 comments on commit e202e96

Please sign in to comment.