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

Merged
merged 1 commit into from Jun 9, 2011

Projects

None yet

3 participants

@voxpelli
Contributor
voxpelli commented Jun 8, 2011

The "end" event that was supposed to be emitted to fix a core bug in NodeJS wasn't fired because it wasn't emitted on the response object.

I encountered this problem when trying to fetch https://profiles.google.com/VoxPelli through JSDom. I tracked it down to being that the response object in this file only emitted "data"-events and no "end"-events. The change here fixed that.

(I hope the bonus spelling correction of "because" is okay as well :) )

@voxpelli voxpelli The "end" event that was supposed to be emitted to fix a core bug in …
…NodeJS wasn't fired because it wasn't emitted on the response object.


I encountered this problem when trying to fetch https://profiles.google.com/VoxPelli through JSDom. I tracked it down to being that the response object in this file only emitted "data"-events and no "end"-events. The change here fixed that.

(I hope the bonus spelling correction of "because" is okay as well :) )
b1f3d54
@mikeal
Member
mikeal commented Jun 8, 2011

do all the tests still pass?

@voxpelli
Contributor
voxpelli commented Jun 9, 2011

Tested now and seems like they do

@smurthas
smurthas commented Jun 9, 2011

I saw this same problem - attached code fixes it for me (with a GET to https://www.google.com/m8/feeds/contacts/default/full)!

@mikeal
Member
mikeal commented Jun 9, 2011

i can't click that link.

@mikeal mikeal merged commit 4be60ee into request:master Jun 9, 2011
@smurthas
smurthas commented Jun 9, 2011

That link was a link that demonstrates the problem. As in:

request({url:'https://www.google.com/m8/feeds/contacts/default/full'}, function(err, resp, body) {
    //never gets here!
});

Rolling a new npm version anytime soon? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment