Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Cannot read property _httpMessage of null #836

Closed
jankuca opened this issue Mar 27, 2011 · 6 comments
Closed

Cannot read property _httpMessage of null #836

jankuca opened this issue Mar 27, 2011 · 6 comments

Comments

@jankuca
Copy link

jankuca commented Mar 27, 2011

http.js:696
  if (this.output.length === 0 && this.connection._httpMessage === this) {
                                                 ^
TypeError: Cannot read property '_httpMessage' of null
    at ServerResponse.end (http.js:696:50)
    at IncomingMessage.<anonymous> (/var/apps/server/proxy.js:42:13)
    at IncomingMessage.emit (events.js:81:20)
    at HTTPParser.onMessageComplete (http.js:132:23)
    at Socket.ondata (http.js:1206:22)
    at Socket._onReadable (net.js:677:27)
    at IOWatcher.onReadable [as callback] (net.js:177:10)

Hi, this error keeps poping when I try to proxy a POST request.

How can I fix this?

response.writeHead(proxy_response.statusCode, proxy_response.headers);
proxy_response.pipe(response);
proxy_response.on('end', function () {
    response.end(); // line 42, error raised here
});
@ry
Copy link

ry commented Mar 28, 2011

can you provide a test script which demonstrates this problem?

@atmos
Copy link

atmos commented May 6, 2011

I'm definitely seeing the same thing on our asset-proxy here at GitHub when we upgraded to 0.4.7 today. @jankuca did you have this working on any previous 0.4.x versions?

@ry ry closed this as completed in 110f065 May 7, 2011
@tmm1
Copy link

tmm1 commented Jun 15, 2011

This is still happening with 0.4.8

http.js:697
  if (this.output.length === 0 && this.connection._httpMessage === this) {
                                                 ^
TypeError: Cannot read property '_httpMessage' of null
    at ServerResponse.end (http.js:697:50)
    at /data/camo/server.js:35:17
    at IncomingMessage.<anonymous> (/data/camo/server.js:121:26)
    at IncomingMessage.emit (events.js:81:20)
    at HTTPParser.onMessageComplete (http.js:133:23)
    at Client.onData [as ondata] (http.js:1484:27)
    at Client._onReadable (net.js:683:27)
    at IOWatcher.onReadable [as callback] (net.js:177:10)

related: #796

@ttekin
Copy link

ttekin commented Jun 24, 2011

Yes this is still happening on our code as well with 0.4.8
Is there a work around?

Thanks a lot.

@kschzt
Copy link

kschzt commented Nov 2, 2011

@ry, this error is still in 0.4.12 unfortunately.

kschzt pushed a commit to rocketpack/node that referenced this issue Nov 2, 2011
@atmos
Copy link

atmos commented Nov 2, 2011

We gave up and started coding around it.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants