Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The "end" event isn't emitted for some responses #35

Merged
merged 1 commit into from
Jun 9, 2011
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,8 @@ Request.prototype.request = function () {
} else {
options._redirectsFollowed = 0;
// Be a good stream and emit end when the response is finished.
// Hack to emit end on close becuase of a core bug that never fires end
response.on('close', function () {options.emit('end')})
// Hack to emit end on close because of a core bug that never fires end
response.on('close', function () {options.response.emit('end')})

if (options.encoding) {
if (options.dests.length !== 0) {
Expand Down