-
Notifications
You must be signed in to change notification settings - Fork 7.3k
TypeError: Cannot call method 'emit' of undefined when using http.get() #784
Comments
I'm experiencing the same issue. It seems to happen when I fire two requests in quick succession. Offending code (in 0.4.2) at https://github.com/joyent/node/blob/v0.4.2/lib/http.js#L1174 , where req remains null. |
I too am experiencing this issue with my local webserver when using {host:'127.0.0.1', ... } Of course when I browse to 127.0.0.1 in my web browser everything looks fine. N.B. While node crashes in trying to connect to the localhost webserver, the webserver logs the connection. Also using 0.4.2 |
I'm pretty sure I found the reason for this: node doesn't handle the absence of a Content-Length header well on normal/default Transfer-Encoding. I explained it here: |
mailing list topic: https://groups.google.com/d/topic/nodejs/kYnfJZeqGZ4/discussion |
Here's a patch which solved the problem for us: #803 |
I have the following code:
When I run this script, I get the following error after the output of "success":
I don't know what's going wrong, as the script works fine with other URLs...
I'm using node.js 0.4.2.
The text was updated successfully, but these errors were encountered: